rename _block to _lock

pull/709/head
Rich Harris 7 years ago
parent 3f73f252ac
commit 197c7e70d0

@ -237,11 +237,11 @@ export default function dom(
${(generator.hasComponents || generator.hasComplexBindings || templateProperties.oncreate || generator.hasIntroTransitions) && deindent`
if ( !options._root ) {
${generator.hasComponents && `this._block = true;`}
${generator.hasComponents && `this._lock = true;`}
${(generator.hasComponents || generator.hasComplexBindings) && `@callAll(this._beforecreate);`}
${(generator.hasComponents || templateProperties.oncreate) && `@callAll(this._oncreate);`}
${(generator.hasComponents || generator.hasIntroTransitions) && `@callAll(this._aftercreate);`}
${generator.hasComponents && `this._block = false;`}
${generator.hasComponents && `this._lock = false;`}
}
`}
}

@ -106,12 +106,12 @@ export function onDev(eventName, handler) {
export function set(newState) {
this._set(assign({}, newState));
if (this._root._block) return;
this._root._block = true;
if (this._root._lock) return;
this._root._lock = true;
callAll(this._root._beforecreate);
callAll(this._root._oncreate);
callAll(this._root._aftercreate);
this._root._block = false;
this._root._lock = false;
}
export function callAll(fns) {

Loading…
Cancel
Save