js/foundation/view/view.js in rsence-pre-2.2.0.2 vs js/foundation/view/view.js in rsence-pre-2.2.0.3

- old
+ new

@@ -1284,14 +1284,15 @@ this.destroyView(_childViewId); } // Remove this object's bindings, except the DOM element. this.remove(); // Remove the DOM element bindings. - for ( i = 0; i < this._domElementBindings.length; i++) { - ELEM.del(this._domElementBindings[i]); + if( this._domElementBindings ){ + for ( i = 0; i < this._domElementBindings.length; i++) { + ELEM.del(this._domElementBindings.pop()); + } + // this._domElementBindings = []; } - this._domElementBindings = []; - // Remove the DOM object itself ELEM.del(this.elemId); this.rect = null;