Skip to content

Commit 6460deb

Browse files
committed
bemtree: use resetApplyNext
1 parent 480c5ea commit 6460deb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

common.blocks/i-bem/i-bem.bemtree

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ var undef,
1515
r = new RegExp(r, 'g');
1616
return function(s) { return ('' + s).replace(r, f); };
1717
};
18-
})();
18+
})(),
19+
resetApplyNext = context.resetApplyNext || function() {};
1920

2021
context.BEMContext = BEMContext;
2122

@@ -32,6 +33,7 @@ function BEMContext(context, apply_) {
3233
this.elem = undef;
3334
this.mods = undef;
3435
this.elemMods = undef;
36+
this._resetApplyNext = resetApplyNext;
3537
}
3638

3739
BEMContext.prototype.isArray = isArray;
@@ -152,6 +154,7 @@ match(this._mode === '')(
152154
def()(function() {
153155
var content = apply('content');
154156
if(content || content === 0) {
157+
this._resetApplyNext(this);
155158
this.ctx.content = apply('', { ctx : content });
156159
}
157160
return this.ctx;

0 commit comments

Comments
 (0)