diff --git a/ignite-template.js b/ignite-template.js index 7cc4b47..25b76c9 100644 --- a/ignite-template.js +++ b/ignite-template.js @@ -2378,12 +2378,13 @@ class list extends IgniteTemplate { if (this.list) { for (var i = 0; i < this.list.length; i++) { var template = this.forEachCallback(this.list[i], i, this.list.length); + if (template) { template.construct(parent, this.element); //If we are reflecting, attach to the elements disconnect event. if (this.reflecting) { - this.reflectCallbacks.push(template.element.attachOnDisconnect(disconnect => this.onItemRemove(this.list[i]))); + this.reflectCallbacks.push(template.element.attachOnDisconnect(() => this.onItemRemove(this.list[i]))); } this.children.push(template);