@neurodyn/react-room-viewer 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14379,15 +14379,16 @@ function RoomViewerProvider({ children, src, tinuuid: initialTinuuid, type, view
|
|
|
14379
14379
|
const hasRooms = rooms.length > 0;
|
|
14380
14380
|
if (!selectedRoom && rooms[0] && roomId !== rooms[0].id) setRoomId(rooms[0].id);
|
|
14381
14381
|
const objectQuery = react_query_useQuery({
|
|
14382
|
-
queryKey: roomViewerObjectQueryKey(
|
|
14382
|
+
queryKey: roomViewerObjectQueryKey(tinuuid ?? void 0, {
|
|
14383
14383
|
apiKey,
|
|
14384
14384
|
baseURL,
|
|
14385
14385
|
source
|
|
14386
14386
|
}),
|
|
14387
|
-
enabled: (!shouldActivatePublicApi || activationQuery.isSuccess || activationQuery.isError && null === activationAccessError) && usesTinuuid &&
|
|
14387
|
+
enabled: (!shouldActivatePublicApi || activationQuery.isSuccess || activationQuery.isError && null === activationAccessError) && usesTinuuid && Boolean(tinuuid),
|
|
14388
|
+
placeholderData: keepPreviousData,
|
|
14388
14389
|
queryFn: async ({ signal })=>{
|
|
14389
|
-
if (!
|
|
14390
|
-
return fetchRoomViewerObject(
|
|
14390
|
+
if (!tinuuid) throw new Error('Tinuuid is required.');
|
|
14391
|
+
return fetchRoomViewerObject(tinuuid, {
|
|
14391
14392
|
apiKey,
|
|
14392
14393
|
baseURL,
|
|
14393
14394
|
signal,
|