Browse Source

fix the case parameter node is null (#9125)

xifeiwu 7 năm trước cách đây
mục cha
commit
e466b32214
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/utils/vdom.js

+ 1 - 1
src/utils/vdom.js

@@ -1,7 +1,7 @@
 import { hasOwn } from 'element-ui/src/utils/util';
 
 export function isVNode(node) {
-  return typeof node === 'object' && hasOwn(node, 'componentOptions');
+  return node !== null && typeof node === 'object' && hasOwn(node, 'componentOptions');
 };
 
 export function getFirstComponentChild(children) {