@@ -447,8 +447,7 @@ export class Component<
447447 /** @internal */
448448 _$external : boolean
449449 shadowRoot : ShadowRoot | ExternalShadowRoot
450- /** @internal */
451- _$tmplInst : TemplateInstance | undefined
450+ templateInstance : TemplateInstance | undefined
452451 /** @internal */
453452 _$relation : Relation | null
454453 /** @internal */
@@ -677,6 +676,7 @@ export class Component<
677676 // eslint-disable-next-line @typescript-eslint/unbound-method
678677 ShadowRoot . createShadowRoot ,
679678 )
679+ comp . templateInstance = tmplInst
680680
681681 // write attr
682682 if ( writeExtraInfoToAttr && backendElement ) {
@@ -891,7 +891,6 @@ export class Component<
891891 } else {
892892 tmplInst . initValues ( dataGroup . innerData || dataGroup . data )
893893 }
894- comp . _$tmplInst = tmplInst
895894 dataGroup . setUpdateListener ( ( data , combinedChanges ) => {
896895 if ( ENV . DEV ) {
897896 performanceMeasureRenderWaterfall ( 'component.render' , 'backend.render' , comp , ( ) => {
@@ -1091,13 +1090,13 @@ export class Component<
10911090 * This method throws error if the template engine does not support template update.
10921091 */
10931092 applyTemplateUpdates ( ) : void {
1094- if ( ! this . _$tmplInst ?. updateTemplate ) {
1093+ if ( ! this . templateInstance ?. updateTemplate ) {
10951094 throw new Error (
10961095 `The template engine of component "${ this . is } " does not support template update` ,
10971096 )
10981097 }
10991098 const dataGroup = this . _$dataGroup
1100- this . _$tmplInst . updateTemplate (
1099+ this . templateInstance . updateTemplate (
11011100 this . _$definition . _$detail ! . template ,
11021101 dataGroup . innerData || dataGroup . data ,
11031102 )
0 commit comments