Skip to content

Commit

Permalink
Add fallback to support coffeescript 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
zmillman authored and za-creature committed May 23, 2018
1 parent fbd4eae commit f305869
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ScopeLinter.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ module.exports = class ScopeLinter
# a named class produces a variable in the local scope and in this
# regard acts like an assignment statement
if node.variable? and node.variable.isAssignable()
if node.variable.shouldCache()
# fallback to support coffeescript 1.x
if node.variable.shouldCache?() or node.variable.isComplex?()
# composite class definition; treat as a read for base value
@visit(node.variable)
else
Expand Down

0 comments on commit f305869

Please sign in to comment.