Add a feature flag

[MAILPOET-1709]
This commit is contained in:
Pavel Dohnal
2019-03-18 09:35:11 +01:00
committed by M. Shull
parent 1fd64330d2
commit abebf5ce49
2 changed files with 4 additions and 0 deletions

View File

@ -592,6 +592,9 @@ Module.PostsWidgetView = base.WidgetView.extend({
});
App.on('before:start', function beforeStartApp(BeforeStartApp) {
if (_.isEmpty(window.config.displayWcProductsWidget)) {
return;
}
BeforeStartApp.registerBlockType('products', {
blockModel: Module.PostsBlockModel,
blockView: Module.PostsBlockView,