mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 03:21:20 -05:00
fixing If/else-to-ternary with instanceof as an unparenthesized condition. JS operator precedence.
This commit is contained in:
@@ -67,3 +67,10 @@ func: ->
|
||||
return (if false then callback())
|
||||
|
||||
ok func() is null
|
||||
|
||||
|
||||
# If-to-ternary with instanceof requires parentheses (no comment).
|
||||
if {} instanceof Object
|
||||
ok yes
|
||||
else
|
||||
ok no
|
||||
|
||||
Reference in New Issue
Block a user