Skip to content

Commit c81e2d4

Browse files
Fix #4575: Check for the previous token’s existence before comparing against it (#4663)
1 parent 3dd4582 commit c81e2d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/coffeescript/lexer.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lexer.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ exports.Lexer = class Lexer
664664
if value is ';'
665665
@seenFor = @seenImport = @seenExport = no
666666
tag = 'TERMINATOR'
667-
else if value is '*' and prev[0] is 'EXPORT'
667+
else if value is '*' and prev?[0] is 'EXPORT'
668668
tag = 'EXPORT_ALL'
669669
else if value in MATH then tag = 'MATH'
670670
else if value in COMPARE then tag = 'COMPARE'

0 commit comments

Comments
 (0)