Skip to content

Commit 1d3ecdd

Browse files
committedNov 28, 2019
Fix spread operator in object literal caused crash issue
1 parent 9353d89 commit 1d3ecdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/tern.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@
673673
function pointInProp(objNode, point) {
674674
for (var i = 0; i < objNode.properties.length; i++) {
675675
var curProp = objNode.properties[i];
676-
if (curProp.key.start <= point && curProp.key.end >= point)
676+
if (curProp.key && curProp.key.start <= point && curProp.key.end >= point)
677677
return curProp;
678678
}
679679
}

0 commit comments

Comments
 (0)
Please sign in to comment.