Browse Source

fix unknown element detection in Safari

Evan You 10 years ago
parent
commit
917134d26f
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/util/component.js

+ 4 - 1
src/util/component.js

@@ -11,7 +11,10 @@ if (process.env.NODE_ENV !== 'production') {
   isUnknownElement = function (el, tag) {
     if (tag.indexOf('-') > -1) {
       // http://stackoverflow.com/a/28210364/1070244
-      return el.constructor === window.HTMLElement
+      return (
+        el.constructor === window.HTMLUnknownElement ||
+        el.constructor === window.HTMLElement
+      )
     } else {
       return (
         /HTMLUnknownElement/.test(el.toString()) &&