mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
fixing up compout assignment for ?=, which was using a sligtly different path.
This commit is contained in:
@@ -1112,7 +1112,7 @@ exports.OpNode = class OpNode extends BaseNode
|
||||
[first, firstVar] = @first.compileReference o, precompile: yes, assignment: yes
|
||||
second = @second.compile o
|
||||
o.scope.find(first) if first.match(IDENTIFIER)
|
||||
return "#first = #{ ExistenceNode.compileTest(o, @first) } ? #firstVar : #second" if @operator is '?='
|
||||
return "#first = #{ ExistenceNode.compileTest(o, literal(firstVar)) } ? #firstVar : #second" if @operator is '?='
|
||||
"#first = #firstVar #{ @operator.substr(0, 2) } #second"
|
||||
|
||||
# If this is an existence operator, we delegate to `ExistenceNode.compileTest`
|
||||
|
||||
Reference in New Issue
Block a user