commit 4766907a871e81e7e1ed120f7fd7bacf9bba92a8 parent 8dc6ee418eaafd9bb057433478ebfc2a70a0067d Author: Jacob R. Edwards <jacob@jacobedwards.org> Date: Thu, 5 Sep 2024 10:41:34 -0700 Support name field in backend addFurniture Diffstat:
| M | files/floorplans/floorplan/backend.js | | | 7 | ++++++- |
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/files/floorplans/floorplan/backend.js b/files/floorplans/floorplan/backend.js @@ -552,7 +552,12 @@ export class FloorplanBackend { if (f.depth <= 0) { throw new Error(options.depth + ": rounded depth must be greater than zero") } - f.depth = options.depth + } + if (options.name != undefined) { + if (typeof options.name !== "string") { + throw new Error(options.name + ": Expected string name") + } + f.name = options.name } return this.addData("furniture", f) }