Cleanup from code coverage report
This commit is contained in:
@@ -50,7 +50,7 @@ JavaScriptCompiler.prototype = {
|
||||
|
||||
compile: function(environment, options, context, asObject) {
|
||||
this.environment = environment;
|
||||
this.options = options || {};
|
||||
this.options = options;
|
||||
this.stringParams = this.options.stringParams;
|
||||
this.trackIds = this.options.trackIds;
|
||||
this.precompile = !asObject;
|
||||
@@ -361,9 +361,9 @@ JavaScriptCompiler.prototype = {
|
||||
return ' != null ? ' + lookup + ' : ' + current;
|
||||
} else {
|
||||
// Otherwise we can use generic falsy handling
|
||||
return (falsy ? ' && ' : ' != null && ') + lookup;
|
||||
return ' && ' + lookup;
|
||||
}
|
||||
}, true);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -385,7 +385,7 @@ JavaScriptCompiler.prototype = {
|
||||
for (var i = 0; i < len; i++) {
|
||||
this.replaceStack(function(current) {
|
||||
return ' && ' + this.nameLookup(current, parts[i], 'data');
|
||||
}, true);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -714,7 +714,7 @@ JavaScriptCompiler.prototype = {
|
||||
return stack;
|
||||
},
|
||||
|
||||
replaceStack: function(callback, chain) {
|
||||
replaceStack: function(callback) {
|
||||
var prefix = '',
|
||||
inline = this.isInline(),
|
||||
stack,
|
||||
@@ -731,18 +731,14 @@ JavaScriptCompiler.prototype = {
|
||||
|
||||
if (top instanceof Literal) {
|
||||
// Literals do not need to be inlined
|
||||
stack = top.value;
|
||||
prefix = stack = top.value;
|
||||
usedLiteral = true;
|
||||
|
||||
if (chain) {
|
||||
prefix = stack;
|
||||
}
|
||||
} else {
|
||||
// Get or create the current stack name for use by the inline
|
||||
createdStack = !this.stackSlot;
|
||||
var name = !createdStack ? this.topStackName() : this.incrStack();
|
||||
|
||||
prefix = '(' + this.push(name) + ' = ' + top + (chain ? ')' : '),');
|
||||
prefix = '(' + this.push(name) + ' = ' + top + ')';
|
||||
stack = this.topStack();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user