fix(widgets): prevent NoIntegrationDataError during initial load and scope indicator

- Add isFetched guard in media-requests/list to avoid throwing before data loads
- Scope refresh indicator to only track widget and integration queries
This commit is contained in:
Thomas Camlong committed 2026-05-28 18:07:03 +02:00
1 parent 1b003bfc50
commit 94cbbde576
1 file changed
+2 -1
@@ -19,7 +19,7 @@ export default function MediaServerWidget({
options,
width,
}: WidgetComponentProps<"mediaRequests-requestList">) {
const { data: mediaRequests = [] } = clientApi.widget.mediaRequests.getLatestRequests.useQuery(
const { data: mediaRequests = [], isFetched } = clientApi.widget.mediaRequests.getLatestRequests.useQuery(
{
integrationIds,
},
@@ -58,6 +58,7 @@ export default function MediaServerWidget({
},
);
if (!isFetched) return null;
if (mediaRequests.length === 0) throw new NoIntegrationDataError();
return (