commit cdd056bc443b0bfc3112ee5521888d2bb3c5f5a8
parent 82631a30079a6f37280a626d842326a323c4a810
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date: Fri, 23 Aug 2024 14:45:38 -0700
Verify valid point in Editor's idRef
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/files/floorplans/floorplan/editor.js b/files/floorplans/floorplan/editor.js
@@ -597,5 +597,8 @@ function refId(ref) {
export function idRef(id) {
let a = id.split("_")
+ if (a.length != 2) {
+ throw new Error("Invalid id")
+ }
return backend.newRef(a[0], a[1])
}