Added missing or to IndexNode.

This commit is contained in:
Tim Jones
2010-05-04 01:12:15 +12:00
committed by Jeremy Ashkenas
parent ac05f62f2f
commit 52e6399e02
2 changed files with 3 additions and 3 deletions

View File

@@ -656,7 +656,7 @@
__extends(IndexNode, BaseNode);
IndexNode.prototype.compile_node = function compile_node(o) {
var idx;
o.chain_root.wrapped = this.soak_node;
o.chain_root.wrapped = o.chain_root.wrapped || this.soak_node;
idx = this.index.compile(o);
return "[" + idx + "]";
};

View File

@@ -451,7 +451,7 @@ exports.AccessorNode: class AccessorNode extends BaseNode
constructor: (name, tag) ->
@children: [@name: name]
@prototype:tag is 'prototype'
@prototype: tag is 'prototype'
@soak_node: tag is 'soak'
this
@@ -470,7 +470,7 @@ exports.IndexNode: class IndexNode extends BaseNode
@soak_node: tag is 'soak'
compile_node: (o) ->
o.chain_root.wrapped: @soak_node
o.chain_root.wrapped: or @soak_node
idx: @index.compile o
"[$idx]"