www.spaceplanner.app

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

commit 95c0ee622ecafad6cb5c80c3921d98f7b096b838
parent c53321a7755dc0697d84fc547521081f0d592062
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Fri, 18 Oct 2024 17:41:59 -0700

Fix backend removal bug

The test for whether oldDiff was defined or not was a simple truth
test which 0 integers as false, now we just use is nullish test
because 0 can be a valid old diff. This prevented the first diff
from being removed.

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 @@ -112,7 +112,7 @@ class BackendHistory { return d } - let oldValue = oldDiff ? this.diffs[oldDiff].value : undefined + let oldValue = (oldDiff != null) ? this.diffs[oldDiff].value : undefined if (op === "add") { op = oldValue ? "replace" : "new" } else {