Skip to content

Commit

Permalink
fix: fix server side judge (close #4787) (#4788)
Browse files Browse the repository at this point in the history
* fix: fix server side judge (close #4787)

* fix: use window.HTMLElement judge (close #4787)
  • Loading branch information
zhangyuang authored Jul 22, 2021
1 parent e0aebf5 commit ca4f6b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ca4f6b8

Please sign in to comment.