From 34aa07469d1ee2d159c3f31ec00d4fcbfb1c7bfd Mon Sep 17 00:00:00 2001 From: suns Date: Sun, 14 Mar 2021 00:39:32 -0800 Subject: [PATCH] unused var removed --- slotted-element.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/slotted-element.js b/slotted-element.js index 1b086cb..266c8db 100644 --- a/slotted-element.js +++ b/slotted-element.js @@ -51,14 +51,13 @@ SlottedElement extends FetchElement } } - let templateDom = this; if( this.template ) { const nodeContent = n => n && (n.content || n); - templateDom = nodeContent(this.template.content) || nodeContent( document.getElementById( this.template ) ); - if( !templateDom ) - templateDom = createNode('template',"innerHTML", this.template).content; + let t = nodeContent(this.template.content) || nodeContent( document.getElementById( this.template ) ); + if( !t ) + t = createNode('template',"innerHTML", this.template).content; this.innerHTML=''; - this.appendChild(templateDom = templateDom.cloneNode(true)) + this.appendChild( t.cloneNode(true)) } for( let s of this.querySelectorAll( 'slot' ) ) { let slot = this.slots[ s.name ];