Simplify program generation logic
This commit is contained in:
@@ -870,16 +870,8 @@ JavaScriptCompiler.prototype = {
|
||||
// Avoid setting fn and inverse if neither are set. This allows
|
||||
// helpers to do a check for `if (options.fn)`
|
||||
if (program || inverse) {
|
||||
if (!program) {
|
||||
program = 'this.noop';
|
||||
}
|
||||
|
||||
if (!inverse) {
|
||||
inverse = 'this.noop';
|
||||
}
|
||||
|
||||
options.fn = program;
|
||||
options.inverse = inverse;
|
||||
options.fn = program || 'this.noop';
|
||||
options.inverse = inverse || 'this.noop';
|
||||
}
|
||||
|
||||
// The parameters go on to the stack in order (making sure that they are evaluated in order)
|
||||
|
||||
Reference in New Issue
Block a user