Skip to content

Commit

Permalink
Fixed bug in LocationDrawer sceneId logic (#9480)
Browse files Browse the repository at this point in the history
Location sceneId's are now projects/<projectName>/<sceneName>.scene.json
Select for sceneId is just <projectName>/<sceneName>
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.
  • Loading branch information
barankyle authored and Rezmason committed Dec 26, 2023
1 parent c4811a2 commit 446a4c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 446a4c3

Please sign in to comment.