Ensure metadata is not null before registering datasources for automatic hot reloading
This commit is contained in:
parent
6b7e410f0d
commit
223a82f717
|
@ -45,13 +45,14 @@
|
||||||
// Register any "refresh datasource" actions with a singleton store
|
// Register any "refresh datasource" actions with a singleton store
|
||||||
// so we can easily refresh data at all levels for any datasource
|
// so we can easily refresh data at all levels for any datasource
|
||||||
if (type === ActionTypes.RefreshDatasource) {
|
if (type === ActionTypes.RefreshDatasource) {
|
||||||
const { dataSource } = metadata || {}
|
if (metadata?.dataSource) {
|
||||||
dataSourceStore.actions.registerDataSource(
|
dataSourceStore.actions.registerDataSource(
|
||||||
dataSource,
|
metadata.dataSource,
|
||||||
instanceId,
|
instanceId,
|
||||||
callback
|
callback
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue