Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix for #1771 fix: only do the check on list comprehensions, not objects

  • Loading branch information...
commit aa3c62e77ef530c08b54cf3ded2b31e49ebca5e8 1 parent 44bf8c2
@michaelficarra michaelficarra authored
View
1  lib/coffee-script/cake.js
@@ -65,7 +65,6 @@
var desc, name, spaces, task;
console.log('');
for (name in tasks) {
- if (!(name in tasks)) continue;
task = tasks[name];
spaces = 20 - name.length;
spaces = spaces > 0 ? Array(spaces + 1).join(' ') : '';
View
1  lib/coffee-script/grammar.js
@@ -560,7 +560,6 @@
tokens = [];
for (name in grammar) {
- if (!(name in grammar)) continue;
alternatives = grammar[name];
grammar[name] = (function() {
var _i, _j, _len, _len2, _ref, _results;
View
1  lib/coffee-script/helpers.js
@@ -39,7 +39,6 @@
extend = exports.extend = function(object, properties) {
var key, val;
for (key in properties) {
- if (!(key in properties)) continue;
val = properties[key];
object[key] = val;
}
View
1  lib/coffee-script/index.js
@@ -3,7 +3,6 @@
_ref = require('./coffee-script');
for (key in _ref) {
- if (!(key in _ref)) continue;
val = _ref[key];
exports[key] = val;
}
View
1  lib/coffee-script/lexer.js
@@ -607,7 +607,6 @@
var _results;
_results = [];
for (key in COFFEE_ALIAS_MAP) {
- if (!(key in COFFEE_ALIAS_MAP)) continue;
_results.push(key);
}
return _results;
View
2  lib/coffee-script/nodes.js
@@ -2172,8 +2172,8 @@
forVarPart = ("" + ivar + " = 0, " + lvar + " = " + svar + ".length") + (this.step ? ", " + stepvar + " = " + (this.step.compile(o, LEVEL_OP)) : '');
stepPart = this.step ? "" + ivar + " += " + stepvar : "" + ivar + "++";
forPart = "" + forVarPart + "; " + ivar + " < " + lvar + "; " + stepPart;
+ guardPart = "\n" + idt1 + "if (!(" + ivar + " in " + svar + ")) continue;";
}
- guardPart = "\n" + idt1 + "if (!(" + ivar + " in " + svar + ")) continue;";
}
if (this.returns) {
resultPart = "" + this.tab + rvar + " = [];\n";
View
2  src/nodes.coffee
@@ -1592,7 +1592,7 @@ exports.For = class For extends While
forVarPart = "#{ivar} = 0, #{lvar} = #{svar}.length" + if @step then ", #{stepvar} = #{@step.compile(o, LEVEL_OP)}" else ''
stepPart = if @step then "#{ivar} += #{stepvar}" else "#{ivar}++"
forPart = "#{forVarPart}; #{ivar} < #{lvar}; #{stepPart}"
- guardPart = "\n#{idt1}if (!(#{ivar} in #{svar})) continue;"
+ guardPart = "\n#{idt1}if (!(#{ivar} in #{svar})) continue;"
if @returns
resultPart = "#{@tab}#{rvar} = [];\n"
returnResult = "\n#{@tab}return #{rvar};"
Please sign in to comment.
Something went wrong with that request. Please try again.