From 446a4c38ad104c896521d0585e66832360b27ca9 Mon Sep 17 00:00:00 2001 From: Kyle Baran Date: Thu, 21 Dec 2023 15:58:26 -0800 Subject: [PATCH] Fixed bug in LocationDrawer sceneId logic (#9480) Location sceneId's are now projects//.scene.json Select for sceneId is just / Setting of state.scene in LocationDrawer.tsx was erroring since there were no matches, and then would prepend projects/ and append .scene.json to the sceneId if saved without touching the scene selector, which would then point the location to an invalid scene. --- .../src/admin/components/Location/LocationDrawer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client-core/src/admin/components/Location/LocationDrawer.tsx b/packages/client-core/src/admin/components/Location/LocationDrawer.tsx index 3530f6a6d9bb..5210e9c921f6 100644 --- a/packages/client-core/src/admin/components/Location/LocationDrawer.tsx +++ b/packages/client-core/src/admin/components/Location/LocationDrawer.tsx @@ -125,7 +125,7 @@ const LocationDrawer = ({ open, mode, selectedLocation, onClose }: Props) => { ...defaultState, name: selectedLocation.name, maxUsers: selectedLocation.maxUsersPerInstance, - scene: selectedLocation.sceneId, + scene: selectedLocation.sceneId.replace('projects/', '').replace('.scene.json', ''), type: selectedLocation.locationSetting?.locationType, videoEnabled: selectedLocation.locationSetting?.videoEnabled, audioEnabled: selectedLocation.locationSetting?.audioEnabled,