File tree 1 file changed +13
-10
lines changed
1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -44,18 +44,21 @@ function compileToFunction(
44
44
template = el ? el . innerHTML : ``
45
45
}
46
46
47
- const { code } = compile (
48
- template ,
49
- extend (
50
- {
51
- hoistStatic : true ,
52
- onError : __DEV__ ? onError : undefined ,
53
- onWarn : __DEV__ ? e => onError ( e , true ) : NOOP
54
- } as CompilerOptions ,
55
- options
56
- )
47
+ const opts = extend (
48
+ {
49
+ hoistStatic : true ,
50
+ onError : __DEV__ ? onError : undefined ,
51
+ onWarn : __DEV__ ? e => onError ( e , true ) : NOOP
52
+ } as CompilerOptions ,
53
+ options
57
54
)
58
55
56
+ if ( ! opts . isCustomElement && typeof customElements !== 'undefined' ) {
57
+ opts . isCustomElement = tag => ! ! customElements . get ( tag )
58
+ }
59
+
60
+ const { code } = compile ( template , opts )
61
+
59
62
function onError ( err : CompilerError , asWarning = false ) {
60
63
const message = asWarning
61
64
? err . message
You can’t perform that action at this time.
0 commit comments