Skip to content

Commit

Permalink
fix experssions array in comple
Browse files Browse the repository at this point in the history
  • Loading branch information
orengriffin committed Sep 7, 2018
1 parent e80b5ba commit 12e6f8a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/NodeWrapper.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,11 @@ forNodeAndChildren = (node, fn) ->
compile = (csSource, node) ->
compiled = coffeeScript.nodes(csSource)

line = node.locationData.first_line
line = if node.locationData?
node.locationData.first_line
else
throw new Error
node.expressions[0].locationData.first_line

forNodeAndChildren compiled, (n) ->
# Fix up location data for each instrumented line. Make these all 0-length,
Expand Down

0 comments on commit 12e6f8a

Please sign in to comment.