diff --git a/packages/client/src/components/context/Provider.svelte b/packages/client/src/components/context/Provider.svelte index 19a5c3a462..3fffaaf7fa 100644 --- a/packages/client/src/components/context/Provider.svelte +++ b/packages/client/src/components/context/Provider.svelte @@ -45,12 +45,13 @@ // Register any "refresh datasource" actions with a singleton store // so we can easily refresh data at all levels for any datasource if (type === ActionTypes.RefreshDatasource) { - const { dataSource } = metadata || {} - dataSourceStore.actions.registerDataSource( - dataSource, - instanceId, - callback - ) + if (metadata?.dataSource) { + dataSourceStore.actions.registerDataSource( + metadata.dataSource, + instanceId, + callback + ) + } } }) }