diff --git a/traits/informed.js b/traits/informed.js index fb304c4..6842209 100644 --- a/traits/informed.js +++ b/traits/informed.js @@ -22,8 +22,10 @@ class InformedBase extends Trait { } destroy() { - delete this._socket.entity; - delete this._socket; + if (this._socket) { + delete this._socket.entity; + delete this._socket; + } } reduceStateDiffForEntityList(diff, position) {