Skip to content

Commit

Permalink
Revert "Throw error on declMod with lazyInit prop"
Browse files Browse the repository at this point in the history
This reverts commit 9ab08cc.
  • Loading branch information
tadatuta committed Jul 26, 2018
1 parent 8447ad0 commit 49d06c9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
9 changes: 0 additions & 9 deletions common.blocks/i-bem-dom/i-bem-dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -768,15 +768,6 @@ var BemDomEntity = inherit(/** @lends BemDomEntity.prototype */{
throw Error('bemDom entities can not be created otherwise than from DOM');
},

/** @override */
declMod : function(mod, props, staticProps) {
if(staticProps && staticProps.lazyInit !== undef) {
throw Error('declMod with lazyInit prop not allowed. Your need use \'lazyInit\' in data-bem params');
}

return this.__base.apply(this, arguments);
},

/** @override */
_processInit : function(heedInit) {
/* jshint eqeqeq: false */
Expand Down
10 changes: 0 additions & 10 deletions common.blocks/i-bem-dom/i-bem-dom.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,6 @@ describe('i-bem-dom', function() {
block2.should.be.instanceOf(Block1);
elem2.should.be.instanceOf(Elem1);
});

it('should throw error if declMod contains lazyInit static property', function() {
var Block = bemDom.declBlock('block');

function mod() {
Block.declMod({ modName : 'mod' }, null, { lazyInit : true });
}

mod.should.throw(Error, 'declMod with lazyInit prop not allowed. Your need use \'lazyInit\' in data-bem params');
});
});

describe('getMod', function() {
Expand Down

0 comments on commit 49d06c9

Please sign in to comment.