aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-12-07 21:09:15 +0100
committerGitHub <noreply@github.com>2020-12-07 21:09:15 +0100
commitfd421097c56696e4c1c4a99c1aae44c59a722be4 (patch)
tree1b28881192f5f83253ff3fd4e8430539ef201719 /src
parentdbcffb396c2db61ff96edc4162602e850797d61f (diff)
downloadjquery-fd421097c56696e4c1c4a99c1aae44c59a722be4.tar.gz
jquery-fd421097c56696e4c1c4a99c1aae44c59a722be4.zip
Core: Make jQuery.isXMLDoc accept falsy input
Fixes gh-4782 Closes gh-4814
Diffstat (limited to 'src')
-rw-r--r--src/core.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core.js b/src/core.js
index e122305ce..31d749dd1 100644
--- a/src/core.js
+++ b/src/core.js
@@ -307,8 +307,8 @@ jQuery.extend( {
},
isXMLDoc: function( elem ) {
- var namespace = elem.namespaceURI,
- docElem = ( elem.ownerDocument || elem ).documentElement;
+ var namespace = elem && elem.namespaceURI,
+ docElem = elem && ( elem.ownerDocument || elem ).documentElement;
// Assume HTML when documentElement doesn't yet exist, such as inside
// document fragments.