Skip to content

Commit

Permalink
Check for block#destruct() has been called already
Browse files Browse the repository at this point in the history
Fix for "TypeError: 'undefined' is not an object evaluating
'_this.dropElemCache().domElem.each'" if `block#destruct()`
has been called several times.
  • Loading branch information
Vladimir Varankin authored and tadatuta committed May 28, 2014
1 parent 42465c3 commit 7436bc0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions blocks-common/i-bem/__dom/i-bem__dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,8 @@ var DOM = BEM.DOM = BEM.decl('i-bem__dom',/** @lends BEM.DOM.prototype */{
var _this = this,
_self = _this.__self;

if(_this._isDestructing) return;

_this._isDestructing = true;

_this._needSpecialUnbind && _self.doc.add(_self.win).unbind('.' + _this._uniqId);
Expand Down

0 comments on commit 7436bc0

Please sign in to comment.