Created
May 27, 2013 02:30
-
-
Save raine/5654893 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| diff --git a/main.js b/main.js | |
| index 93ed992..2f46a9b 100644 | |
| --- a/main.js | |
| +++ b/main.js | |
| @@ -233,7 +233,12 @@ var refreshButton = function(opts) { | |
| } | |
| var getWilting = function(obj) { | |
| - return (obj && (obj.wiltingReduced || obj.wilting)) || 0; | |
| + if (obj === undefined) { return 0; } | |
| + if ('wiltingReduced' in obj) { | |
| + return obj.wiltingReduced; | |
| + } else if ('wilting' in obj) { | |
| + return obj.wilting; | |
| + } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment