🌐 AI搜索 & 代理 主页
Skip to content

Commit 904fc38

Browse files
dangkyokhoangmgol
authored andcommitted
Core: Throw a better error when documentElement is missing
This is a resubmit of jquerygh-439 that was lost during the switch from JSHint + JSCS to ESLint Ref jquerygh-442 Ref jquerygh-439 (cherry picked from commit 7d92424)
1 parent 5d90d4f commit 904fc38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sizzle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ setDocument = Sizzle.setDocument = function( node ) {
602602
doc = node ? node.ownerDocument || node : preferredDoc;
603603

604604
// Return early if doc is invalid or already selected
605-
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
605+
if ( doc === document || doc.nodeType !== 9 ) {
606606
return document;
607607
}
608608

0 commit comments

Comments
 (0)