Created
July 1, 2025 09:22
-
-
Save RodrigoTomeES/f01da6107c59070994bb8443116a0530 to your computer and use it in GitHub Desktop.
Patch dom-parser issue #34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/dom-parser/dist/lib/Dom.js b/node_modules/dom-parser/dist/lib/Dom.js | |
index e94dd0d..4f29243 100644 | |
--- a/node_modules/dom-parser/dist/lib/Dom.js | |
+++ b/node_modules/dom-parser/dist/lib/Dom.js | |
@@ -71,7 +71,7 @@ function* domGenerator(html) { | |
} | |
} | |
function isElementComposed(element, tag) { | |
- if (!tag) { | |
+ if (!tag || !element) { | |
return false; | |
} | |
const isCloseTag = closeTagExp.test(tag); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ershov-konst/dom-parser#34