Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion blocks-common/i-bem/__html/i-bem__html.bemhtml
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ default: {

if (!mixItem) continue;

var hasItem = mixItem.block || mixItem.elem,
var hasItem = (mixItem.block && (this.block !== v.block || mixItem.block !== this.block)) || this.elem || mixItem.elem,
block = mixItem.block || mixItem._block || this.block,
elem = mixItem.elem || mixItem._elem || this.elem,
mods = mixItem.mods || this.mods,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
block b1, mix: { block: 'b2' }
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="b1 b2 b1_m1_v1"></div><div class="b1__e1 b1"></div><div class="b1 b2 b1__e1"></div>
18 changes: 18 additions & 0 deletions blocks-common/i-bem/__html/test/files/i-bem/gh-core-804.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"block": "b1",
"mix": {
"block": "b1",
"mods": { "m1": "v1" }
}
},
{
"block": "b1",
"elem": "e1",
"mix": [{ "block": "b1" }]
},
{
"block": "b1",
"mix": [{ "block": "b1", "elem": "e1" }]
}
]
1 change: 1 addition & 0 deletions blocks-common/i-bem/__html/test/i-bem-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ suite('i-bem block and others', function() {
unit('applyNext in content regression #289', 'gh-289');
unit('mods redefinition #550', 'gh-550');
unit('block with escaping this', 'escaping-this');
unit('mix with same block bem-core/804', 'gh-core-804');

test('re-entrance', function() {
var t = bemhtml.compile(iBem + readFile('i-bem/re-entrant.bemhtml'));
Expand Down