diff --git a/packages/client-core/src/admin/components/locations/AddEditLocationModal.tsx b/packages/client-core/src/admin/components/locations/AddEditLocationModal.tsx index 0d08c30bcd..f1dab4177a 100644 --- a/packages/client-core/src/admin/components/locations/AddEditLocationModal.tsx +++ b/packages/client-core/src/admin/components/locations/AddEditLocationModal.tsx @@ -61,7 +61,13 @@ export default function AddEditLocationModal(props: { location?: LocationType; s const locationID = useHookstate(props.location?.id || null) - const locationQuery = useFind(locationPath, { query: { id: locationID.value } }) + const params = { + query: { + id: locationID.value + } + } + + const locationQuery = useFind(locationPath, locationID.value ? params : undefined) const location = locationID.value ? locationQuery.data[0] : undefined const locationMutation = useMutation(locationPath)