From 46535e5ab85e326e4e536b0232a4b56ea3178edc Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sun, 11 Nov 2018 13:58:16 +0000 Subject: [PATCH] Remove endpoint from map when destroyed --- packages/core/src/dataspace.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/dataspace.js b/packages/core/src/dataspace.js index 2a214c3..2cb2309 100644 --- a/packages/core/src/dataspace.js +++ b/packages/core/src/dataspace.js @@ -632,6 +632,7 @@ Endpoint.prototype.destroy = function (ds, ac, facet, emitPatches) { // ^ TODO: this won't work because of object identity problems! Why // does the Racket implementation do this, when the old JS // implementation doesn't? + facet.endpoints = facet.endpoints.remove(this.id); this._uninstall(ds, ac, emitPatches); };