Skip to content

Commit 1292807

Browse files
author
Joachim Seminck
committed
Add comment explaining try/catch
1 parent fa890cb commit 1292807

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/util/Components.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ function componentRule(rule, context) {
216216
*/
217217
isExplicitComponent: function(node) {
218218
let comment;
219+
// Sometimes the passed node may not have been parsed yet by eslint, and this function call crashes.
220+
// Can be removed when eslint sets "parent" property for all nodes on initial AST traversal: https://github.com/eslint/eslint-scope/issues/27
219221
try {
220222
comment = sourceCode.getJSDocComment(node);
221223
} catch (e) {

0 commit comments

Comments
 (0)