diff --git a/lib/walkers/nested.js b/lib/walkers/nested.js index 3bfbdb2..0789d8e 100644 --- a/lib/walkers/nested.js +++ b/lib/walkers/nested.js @@ -141,7 +141,8 @@ class LevelWalker { const tech = item.tech; // Find file with same modifier name. - if (tech && entity && scope.block === entity.block && scope.modName === entity.modName) { + if (tech && entity && scope.block === entity.block + && scope.mod.name === (entity.mod && entity.mod.name)) { this.add(new BemFile( new BemCell({ entity: entity, @@ -212,7 +213,7 @@ class LevelWalker { if (tech && entity && scope.block === entity.block && scope.elem === entity.elem - && scope.modName === entity.modName + && scope.mod.name === (entity.mod && entity.mod.name) ) { this.add(new BemFile( new BemCell({