File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -44,18 +44,21 @@ function compileToFunction(
4444 template = el ? el . innerHTML : ``
4545 }
4646
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
5754 )
5855
56+ if ( ! opts . isCustomElement && typeof customElements !== 'undefined' ) {
57+ opts . isCustomElement = tag => ! ! customElements . get ( tag )
58+ }
59+
60+ const { code } = compile ( template , opts )
61+
5962 function onError ( err : CompilerError , asWarning = false ) {
6063 const message = asWarning
6164 ? err . message
You can’t perform that action at this time.
0 commit comments