Skip to content

Commit efb9809

Browse files
committed
Merge pull request #3233 from xixixao/issue2953cleanup
Clean up `Method calls on splice endpoints`
2 parents 9e9c83f + 0dada3d commit efb9809

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/coffee-script/nodes.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/nodes.coffee

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,9 +1274,9 @@ exports.Assign = class Assign extends Base
12741274
else
12751275
fromDecl = fromRef = '0'
12761276
if to
1277-
if from and from instanceof Value and from?.isSimpleNumber() and
1278-
to instanceof Value and to.isSimpleNumber()
1279-
to = +to.compile(o) - +fromRef
1277+
if from instanceof Value and from.isSimpleNumber() and
1278+
to instanceof Value and to.isSimpleNumber()
1279+
to = to.compile(o) - fromRef
12801280
to += 1 unless exclusive
12811281
else
12821282
to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef

0 commit comments

Comments
 (0)