Skip to content

Commit

Permalink
unused var removed
Browse files Browse the repository at this point in the history
  • Loading branch information
sashafirsov committed Mar 14, 2021
1 parent 324d9e7 commit 34aa074
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions slotted-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down

0 comments on commit 34aa074

Please sign in to comment.