From 85f5ebdec1391c3429c5d5f396ecaed06728c5e8 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 5 Aug 2017 22:22:23 -0400 Subject: [PATCH] replace set with noop instead of checking _destroyed --- src/shared/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/index.js b/src/shared/index.js index 87f4728f8f..7e4afb7dfe 100644 --- a/src/shared/index.js +++ b/src/shared/index.js @@ -5,6 +5,7 @@ export * from './utils.js'; export function destroy(detach) { if (!this._destroyed) { + this.set = noop; this.fire('destroy'); if (detach !== false) this._fragment.unmount(); @@ -123,7 +124,6 @@ export function onDev(eventName, handler) { } export function set(newState) { - if (this._destroyed) return; this._set(assign({}, newState)); if (this._root._lock) return; this._root._lock = true;