@eslint-react/ast 5.8.4-beta.1 → 5.8.4-beta.3
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 +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -315,7 +315,7 @@ function findParent(node, test, stop) {
|
|
|
315
315
|
if (node == null) return null;
|
|
316
316
|
let current = node.parent;
|
|
317
317
|
while (current != null) {
|
|
318
|
-
if (stop?.(current)) return null;
|
|
318
|
+
if (stop?.(current) ?? false) return null;
|
|
319
319
|
if (test(current)) return current;
|
|
320
320
|
if (current.type === AST_NODE_TYPES.Program) return null;
|
|
321
321
|
current = current.parent;
|