Skip to content

Commit

Permalink
fixup! Fix _findParentEntities method. Add additional condition
Browse files Browse the repository at this point in the history
  • Loading branch information
tadatuta committed Jul 24, 2018
1 parent 3d4e6c2 commit dd0ce4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common.blocks/i-bem-dom/i-bem-dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,8 @@ var BemDomEntity = inherit(/** @lends BemDomEntity.prototype */{
*/
_findParentEntities : function(entity, onlyFirst) {
return this._findEntities(entity, onlyFirst, function(domNode, _initEntity, className) {
while(domNode = domNode.parentNode)
if(domNode.classList && domNode.classList.contains(className) && !_initEntity(domNode))
while(domNode = domNode.parentElement)
if(domNode.classList.contains(className) && !_initEntity(domNode))
return false;
});
},
Expand Down

0 comments on commit dd0ce4a

Please sign in to comment.