fix corner cases in parse & unused (#5000)

This commit is contained in:
Alex Lam S.L
2021-06-12 17:10:01 +01:00
committed by GitHub
parent 70ceda5398
commit f8b2215145
5 changed files with 42 additions and 43 deletions

View File

@@ -344,9 +344,9 @@ function run() {
var list = annotations[node.start.file];
var pure = list[node.start.pos];
if (!pure) {
var pos = node.start.parens;
if (pos) for (var i = 0; !pure && i < pos.length; i++) {
pure = list[pos[i]];
var tokens = node.start.parens;
if (tokens) for (var i = 0; !pure && i < tokens.length; i++) {
pure = list[tokens[i].pos];
}
}
if (pure) node.pure = pure;