Last active
January 4, 2016 01:39
-
-
Save andrewgross/8549654 to your computer and use it in GitHub Desktop.
Weird MVEL issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This works: | |
discount = 50.0 | |
if (!doc["discount"].empty) { | |
discount = doc["discount"].value; | |
} else { | |
discount = 50.0; | |
} | |
// This works: | |
discount = doc["discount"].empty ? 50.0 : doc["discount"].value; | |
// This doesn't | |
discount = 50.0 | |
if (!doc["discount"].empty) { | |
discount = doc["discount"].value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment