Mercurial > code > home > repos > light9
changeset 2276:1b7cde922c3d
save some work
author | drewp@bigasterisk.com |
---|---|
date | Mon, 29 May 2023 15:17:28 -0700 |
parents | dd9474bef2a6 |
children | f61531e21a77 |
files | light9/web/SyncedGraph.ts |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/web/SyncedGraph.ts Mon May 29 15:16:57 2023 -0700 +++ b/light9/web/SyncedGraph.ts Mon May 29 15:17:28 2023 -0700 @@ -51,7 +51,10 @@ this.cachedFloatValues = new Map(); // s + '|' + p -> number this.cachedUriValues = new Map(); // s + '|' + p -> Uri - this._applyPatch(patchToDeleteEntireGraph(this.graph)); + const p = patchToDeleteEntireGraph(this.graph); + if (!p.isEmpty()) { + this._applyPatch(p); + } // if we had a Store already, this lets N3.Store free all its indices/etc this.graph = new N3.Store(); this.rebuildPrefixFuncs(this.prefixes);