@eslint-react/ast 5.8.3 → 5.8.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -288,6 +288,7 @@ const isEqual = dual(2, (a, b) => {
|
|
|
288
288
|
while (i--) {
|
|
289
289
|
const exprA = a.expressions[i];
|
|
290
290
|
const exprB = b.expressions[i];
|
|
291
|
+
if (exprA == null || exprB == null) return false;
|
|
291
292
|
if (!isEqual(exprA, exprB)) return false;
|
|
292
293
|
}
|
|
293
294
|
return true;
|
|
@@ -316,7 +317,7 @@ function findParent(node, test, stop) {
|
|
|
316
317
|
while (current != null) {
|
|
317
318
|
if (stop?.(current)) return null;
|
|
318
319
|
if (test(current)) return current;
|
|
319
|
-
if (current.type ===
|
|
320
|
+
if (current.type === AST_NODE_TYPES.Program) return null;
|
|
320
321
|
current = current.parent;
|
|
321
322
|
}
|
|
322
323
|
return null;
|