mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
Merge branch 'master' of github.com:jashkenas/coffee-script
This commit is contained in:
10
lib/nodes.js
10
lib/nodes.js
@@ -827,7 +827,7 @@
|
||||
join = '';
|
||||
}
|
||||
indent = prop instanceof CommentNode ? '' : this.idt(1);
|
||||
if (prop instanceof ValueNode && prop.tags['this']) {
|
||||
if (prop instanceof ValueNode && prop.tags["this"]) {
|
||||
prop = new AssignNode(prop.properties[0].name, prop, 'object');
|
||||
} else if (!(prop instanceof AssignNode) && !(prop instanceof CommentNode)) {
|
||||
prop = new AssignNode(prop, prop, 'object');
|
||||
@@ -1033,7 +1033,7 @@
|
||||
if (obj instanceof AssignNode) {
|
||||
_ref2 = obj, idx = _ref2.variable.base, obj = _ref2.value;
|
||||
} else {
|
||||
idx = isObject ? obj : literal(0);
|
||||
idx = isObject ? (obj.tags["this"] ? obj.properties[0].name : obj) : literal(0);
|
||||
}
|
||||
if (!(value instanceof ValueNode)) {
|
||||
value = new ValueNode(value);
|
||||
@@ -1056,11 +1056,7 @@
|
||||
if (obj instanceof AssignNode) {
|
||||
_ref2 = [obj.value, obj.variable.base], obj = _ref2[0], idx = _ref2[1];
|
||||
} else {
|
||||
if (obj.tags['this']) {
|
||||
idx = obj.properties[0].name;
|
||||
} else {
|
||||
idx = obj;
|
||||
}
|
||||
idx = obj.tags["this"] ? obj.properties[0].name : obj;
|
||||
}
|
||||
}
|
||||
if (!(obj instanceof ValueNode || obj instanceof SplatNode)) {
|
||||
|
||||
Reference in New Issue
Block a user