From 6711cd54791ae0b917c3c5ea4a8775ad5b368542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lopes?= Date: Fri, 5 Mar 2021 16:28:22 +0100 Subject: [PATCH] Fixes missing `let` in `for...of` causing issues ``` ReferenceError: assignment to undeclared variable child ``` When using ES modules (I assume that's the root cause), the absence of `let` breaks this script. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index aed51a1..91b13a7 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,7 @@ module.exports = function extract(options = {}) { return } - for (child of children) { + for (let child of children) { if (each(child)) { return 1 }