From ca4f6b8dfcc96c0f59d7b78afba8633d06faced8 Mon Sep 17 00:00:00 2001 From: yuuang <569105585@qq.com> Date: Fri, 23 Jul 2021 00:41:23 +0800 Subject: [PATCH] fix: fix server side judge (close #4787) (#4788) * fix: fix server side judge (close #4787) * fix: use window.HTMLElement judge (close #4787) --- src/utils/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/utils.js b/src/utils/utils.js index e61989a4a..59d827435 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -94,7 +94,7 @@ function isObject(o) { } function isNode(node) { // eslint-disable-next-line - if (typeof window !== 'undefined') { + if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') { return node instanceof HTMLElement; } return node && (node.nodeType === 1 || node.nodeType === 11);