Created
September 8, 2011 17:03
-
-
Save aseemk/1203929 to your computer and use it in GitHub Desktop.
Streamline bug: order of precedence w/ comma operator
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
thing = | |
if id = input.id | |
Thing.getById id, _ | |
else | |
url = adjustURL input.url | |
Thing.getByURL url, _ |
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
var id, thing, url; | |
thing = (id = input.id) ? Thing.getById(id, _) : (url = adjustURL(input.url), Thing.getByURL(url, _)); |
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
(function main(_) { | |
var id, thing, url; | |
var __frame = { | |
name: "main", | |
line: 1 | |
}; | |
return __func(_, this, arguments, main, 0, __frame, function __$main() { | |
return (function __$main(_) { | |
var __1 = (id = input.id); | |
return (function __$main(__then) { | |
if (__1) { | |
return Thing.getById(id, __cb(_, __frame, 1, 26, _)); | |
} | |
else { | |
__then(); | |
} | |
; | |
})(function __$main() { | |
return Thing.getByURL(url, __cb(_, __frame, 1, 78, function ___(__0, __4) { | |
var __3 = (url = adjustURL(input.url), __4); | |
return _(null, __3); | |
})); | |
}); | |
})(__cb(_, __frame, 7, 6, function ___(__0, __2) { | |
thing = __2; | |
_(); | |
})); | |
}); | |
}).call(this, __trap); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment