mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-19 03:44:23 -05:00
Fixing issue #276 -- unsoaked cached indexes.
This commit is contained in:
@@ -353,7 +353,7 @@
|
||||
return this.base instanceof LiteralNode && this.base.value.match(NUMBER);
|
||||
};
|
||||
ValueNode.prototype.cacheIndexes = function(o) {
|
||||
var _len, _ref2, _ref3, copy, i, index, indexVar, prop;
|
||||
var _len, _ref2, _ref3, copy, first, i, index, indexVar, prop;
|
||||
copy = new ValueNode(this.base, this.properties.slice(0));
|
||||
if (this.base.isComplex()) {
|
||||
_ref2 = this.base.compileReference(o);
|
||||
@@ -367,8 +367,11 @@
|
||||
_ref3 = prop.index.compileReference(o);
|
||||
index = _ref3[0];
|
||||
indexVar = _ref3[1];
|
||||
this.properties[i] = new IndexNode(index);
|
||||
this.properties[i] = (first = new IndexNode(index));
|
||||
copy.properties[i] = new IndexNode(indexVar);
|
||||
if (prop.soakNode) {
|
||||
first.soakNode = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return [this, copy];
|
||||
|
||||
Reference in New Issue
Block a user