8000 component: exclude <time> and others from custom element list · codeclever/vue@13e0335 · GitHub
[go: up one dir, main page]

Skip to content

Commit 13e0335

Browse files
committed
component: exclude <time> and others from custom element list
1 parent 23aa427 commit 13e0335

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/util/component.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,15 @@ exports.checkComponent = function (el, options) {
2121
if (is) {
2222
return is
2323
} else if (process.env.NODE_ENV !== 'production') {
24-
if (tag.indexOf('-') > -1 ||
25-
/HTMLUnknownElement/.test(Object.prototype.toString.call(el))) {
24+
if (
25+
tag.indexOf('-') > -1 ||
26+
(
27+
/HTMLUnknownElement/.test(el.toString()) &&
28+
// Chrome returns unknown for several HTML5 elements.
29+
// https://code.google.com/p/chromium/issues/detail?id=540526
30+
!/^(data|time|rtc|rb)$/.test(tag)
31+
)
32+
) {
2633
_.warn(
2734
'Unknown custom element: <' + tag + '> - did you ' +
2835
'register the component correctly?'

0 commit comments

Comments
 (0)
0