Skip to content

Commit 28e801f

Browse files
authored
fix: parser error on empty markup string, causing WSOD (#179)
1 parent 367858c commit 28e801f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ function runUnsafe({ rootNode, query }) {
243243
}
244244

245245
function parse({ rootNode, markup, query, cacheId, prevResult }) {
246-
if (!markup && !rootNode) {
246+
if (typeof markup !== 'string' && !rootNode) {
247247
throw new Error('either markup or rootNode should be provided');
248248
}
249249

0 commit comments

Comments
 (0)