|
|
|
@ -5,8 +5,7 @@ export * from './transitions.js';
|
|
|
|
|
export * from './utils.js';
|
|
|
|
|
|
|
|
|
|
export function destroy(detach) {
|
|
|
|
|
if (!this._destroyed) {
|
|
|
|
|
this.set = noop;
|
|
|
|
|
this.destroy = this.set = noop;
|
|
|
|
|
this.fire('destroy');
|
|
|
|
|
|
|
|
|
|
if (detach !== false) this._fragment.unmount();
|
|
|
|
@ -14,13 +13,13 @@ export function destroy(detach) {
|
|
|
|
|
this._fragment = null;
|
|
|
|
|
|
|
|
|
|
this._state = {};
|
|
|
|
|
this._destroyed = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function destroyDev(detach) {
|
|
|
|
|
if (this._destroyed) console.warn('Component was already destroyed');
|
|
|
|
|
destroy.call(this, detach);
|
|
|
|
|
this.destroy = function() {
|
|
|
|
|
console.warn('Component was already destroyed');
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function differs(a, b) {
|
|
|
|
|