Permalink
Browse files

Regenerate browser files

  • Loading branch information...
1 parent 37180a8 commit a126a7510ff351f7d29bcffe09cf576e4a5d6f00 @bhagany bhagany committed Apr 3, 2013
Showing with 31 additions and 17 deletions.
  1. +15 −8 browser/nunjucks-dev.js
  2. +1 −1 browser/nunjucks-min.js
  3. +15 −8 browser/nunjucks.js
View
@@ -613,26 +613,33 @@ function makeKeywordArgs(obj) {
}
function getKeywordArgs(args) {
- if(args.length && args[args.length - 1].__keywords) {
- return args[args.length - 1];
+ var len = args.length;
+ if(len) {
+ var lastArg = args[len - 1];
+ if(lastArg && lastArg.hasOwnProperty('__keywords')) {
+ return lastArg;
+ }
}
return {};
}
function numArgs(args) {
- if(args.length === 0) {
+ var len = args.length;
+ if(len === 0) {
return 0;
}
- else if(args[args.length - 1].__keywords) {
- return args.length - 1;
+
+ var lastArg = args[len - 1];
+ if(lastArg && lastArg.hasOwnProperty('__keywords')) {
+ return len - 1;
}
else {
- return args.length;
+ return len;
}
}
-// A SafeString object indicates that the string should not be
-// autoescaped. This happens magically because autoescaping only
+// A SafeString object indicates that the string should not be
+// autoescaped. This happens magically because autoescaping only
// occurs on primitive string objects.
function SafeString(val) {
if(typeof val != 'string') {
Oops, something went wrong.

0 comments on commit a126a75

Please sign in to comment.