diff options
| author | Misko Hevery | 2010-03-31 17:56:16 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-03-31 18:18:10 -0700 |
| commit | 11a6431f8926c557f3c58408dacc98466e76cde1 (patch) | |
| tree | ab36304fd373d0947ca36c577e25ca87a1c894af /src/Parser.js | |
| parent | 35a91085004e31f786df1e0011bc26ed0142ab4d (diff) | |
| download | angular.js-11a6431f8926c557f3c58408dacc98466e76cde1.tar.bz2 | |
started to add services
Diffstat (limited to 'src/Parser.js')
| -rw-r--r-- | src/Parser.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Parser.js b/src/Parser.js index ef1465a0..ec58295a 100644 --- a/src/Parser.js +++ b/src/Parser.js @@ -11,8 +11,8 @@ Lexer.OPERATORS = { 'true':function(self){return true;}, 'false':function(self){return false;}, 'undefined':noop, - '+':function(self, a,b){return (a||0)+(b||0);}, - '-':function(self, a,b){return (a||0)-(b||0);}, + '+':function(self, a,b){return (isDefined(a)?a:0)+(isDefined(b)?b:0);}, + '-':function(self, a,b){return (isDefined(a)?a:0)-(isDefined(b)?b:0);}, '*':function(self, a,b){return a*b;}, '/':function(self, a,b){return a/b;}, '%':function(self, a,b){return a%b;}, |
