www.spaceplanner.app

Web client to the spaceplanner API
git clone git://jacobedwards.org/www.spaceplanner.app
Log | Files | Refs

commit b8d0e7f186419b06334b1d5b3cf85c3aec921479
parent e4c3c85d601b06ee227dd779d60bc555d3edb5bc
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Tue, 15 Oct 2024 18:03:18 -0700

Update cache before calling patch callback in backend

I did it afterwords originally so I could access the old value if
I remember correctly (and I may not), but I don't need to and it's
just a poor design.  Notably this caused an issue where the pointmaps
would be placed using outdated data.

Diffstat:
Mfiles/floorplans/floorplan/backend.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/files/floorplans/floorplan/backend.js b/files/floorplans/floorplan/backend.js @@ -432,10 +432,10 @@ export class FloorplanBackend { console.debug("Backend.addData", id, value) let t = idTable(id) + this.cache[t][id] = value if (!options.nodiff) { this.cb("patch", this.history.addDiff("add", idPath(id), value, options)) } - this.cache[t][id] = value return id }