|
|
@ -15,6 +15,7 @@ function assign(target) {
|
|
|
|
|
|
|
|
|
|
|
|
function destroy(detach) {
|
|
|
|
function destroy(detach) {
|
|
|
|
if (!this._destroyed) {
|
|
|
|
if (!this._destroyed) {
|
|
|
|
|
|
|
|
this.set = noop;
|
|
|
|
this.fire('destroy');
|
|
|
|
this.fire('destroy');
|
|
|
|
|
|
|
|
|
|
|
|
if (detach !== false) this._fragment.unmount();
|
|
|
|
if (detach !== false) this._fragment.unmount();
|
|
|
@ -103,7 +104,6 @@ function on(eventName, handler) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function set(newState) {
|
|
|
|
function set(newState) {
|
|
|
|
if (this._destroyed) return;
|
|
|
|
|
|
|
|
this._set(assign({}, newState));
|
|
|
|
this._set(assign({}, newState));
|
|
|
|
if (this._root._lock) return;
|
|
|
|
if (this._root._lock) return;
|
|
|
|
this._root._lock = true;
|
|
|
|
this._root._lock = true;
|
|
|
@ -158,7 +158,7 @@ function SvelteComponent ( options ) {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
this._handlers = Object.create( null );
|
|
|
|
this._handlers = Object.create( null );
|
|
|
|
this._handlers.destroy = [template.ondestroy.bind(this)];
|
|
|
|
this._handlers.destroy = [template.ondestroy];
|
|
|
|
|
|
|
|
|
|
|
|
this._root = options._root || this;
|
|
|
|
this._root = options._root || this;
|
|
|
|
this._yield = options._yield;
|
|
|
|
this._yield = options._yield;
|
|
|
|