mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
Wrapping existence tests on functions.
This commit is contained in:
@@ -442,8 +442,8 @@ exports.CallNode = class CallNode extends BaseNode
|
|||||||
o.chainRoot = this unless o.chainRoot
|
o.chainRoot = this unless o.chainRoot
|
||||||
if @exist
|
if @exist
|
||||||
[@first, @meth] = @variable.compileReference o, precompile: yes
|
[@first, @meth] = @variable.compileReference o, precompile: yes
|
||||||
@first = "typeof #{@first} === \"function\" ? "
|
@first = "(typeof #{@first} === \"function\" ? "
|
||||||
@last = " : null"
|
@last = " : null)"
|
||||||
else if @variable then @meth = @variable.compile o
|
else if @variable then @meth = @variable.compile o
|
||||||
for arg in @args when arg instanceof SplatNode
|
for arg in @args when arg instanceof SplatNode
|
||||||
compilation = @compileSplat(o)
|
compilation = @compileSplat(o)
|
||||||
|
|||||||
Reference in New Issue
Block a user