From fd19e6a016d2bfa48c3e460e7883aa77c4541586 Mon Sep 17 00:00:00 2001 From: Ilya Volodin Date: Fri, 15 May 2020 11:16:15 -0400 Subject: [PATCH] Fix: Stop path analyzer on unknown nodes --- lib/linter/code-path-analysis/code-path-analyzer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/linter/code-path-analysis/code-path-analyzer.js b/lib/linter/code-path-analysis/code-path-analyzer.js index 8a623e33ea06..0ad66f9e6ef6 100644 --- a/lib/linter/code-path-analysis/code-path-analyzer.js +++ b/lib/linter/code-path-analysis/code-path-analyzer.js @@ -153,6 +153,10 @@ function isIdentifierReference(node) { */ function forwardCurrentToHead(analyzer, node) { const codePath = analyzer.codePath; + + if (!codePath) { + return; + } const state = CodePath.getState(codePath); const currentSegments = state.currentSegments; const headSegments = state.headSegments;