Skip to content

Commit ba9d255

Browse files
last-partizanothree
authored andcommitted
Fix TypeError in doc_comment.js
When editing vue files ternjs is crashing with following error: ``` var proto = node.objType.getProp("prototype").getObjType(); ^ TypeError: Cannot read property 'getProp' of undefined ``` This change fixed it.
1 parent 74f1459 commit ba9d255

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

plugin/doc_comment.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
}
9595
},
9696
Class: function(node, scope) {
97+
if (!node.objType) return;
9798
var proto = node.objType.getProp("prototype").getObjType();
9899
if (!proto) return;
99100
for (var i = 0; i < node.body.body.length; i++) {

0 commit comments

Comments
 (0)