Skip to content

Commit

Permalink
add return before apply*
Browse files Browse the repository at this point in the history
  • Loading branch information
aristov committed Aug 14, 2015
1 parent bb55ebb commit 3fffc18
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ block('dropdown').mod('switcher', 'button').elem('switcher').def()(function() {
res.mix = apply('mix');
}

applyCtx(res);
return applyCtx(res);
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ block('dropdown').mod('switcher', 'link').elem('switcher').def()(function() {
res.mix = apply('mix');
}

applyCtx(res);
return applyCtx(res);
});
8 changes: 4 additions & 4 deletions common.blocks/dropdown/dropdown.bemhtml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
block('dropdown')(
def()(function() {
applyCtx([{ elem : 'switcher' }, { elem : 'popup' }]);
return applyCtx([{ elem : 'switcher' }, { elem : 'popup' }]);
}),
def()(function() {
var ctx = this.ctx;

ctx.js = this.extend(apply('js'), ctx.js);
applyNext({ _dropdown : ctx });
return applyNext({ _dropdown : ctx });
}),
js()(function() {
return { id : this.generateId() };
Expand All @@ -17,7 +17,7 @@ block('dropdown')(

switcher.block && (switcher.mix = apply('mix'));

applyCtx(switcher);
return applyCtx(switcher);
}),
elem('switcher').mix()(function() {
var dropdown = this._dropdown;
Expand All @@ -40,6 +40,6 @@ block('dropdown')(

popup.mix = [dropdown].concat(popup.mix || []);

applyCtx(popup);
return applyCtx(popup);
})
);

0 comments on commit 3fffc18

Please sign in to comment.