quick fix to part of new issue in #1099:

`not in []` unconditionally compiled to `false`
This commit is contained in:
Michael Ficarra
2011-10-03 06:43:00 -04:00
parent 9fef66ffcf
commit cf996d2c4a
3 changed files with 9 additions and 6 deletions

View File

@@ -1892,6 +1892,7 @@
In.prototype.compileOrTest = function(o) {
var cmp, cnj, i, item, ref, sub, tests, _ref2, _ref3;
if (this.array.base.objects.length === 0) return "" + (!!this.negated);
_ref2 = this.object.cache(o, LEVEL_OP), sub = _ref2[0], ref = _ref2[1];
_ref3 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref3[0], cnj = _ref3[1];
tests = (function() {
@@ -1904,7 +1905,6 @@
}
return _results;
}).call(this);
if (tests.length === 0) return 'false';
tests = tests.join(cnj);
if (o.level < LEVEL_OP) {
return tests;