Ensure metadata is not null before registering datasources for automatic hot reloading
This commit is contained in:
parent
6b7e410f0d
commit
223a82f717
|
@ -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
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue