mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: Fix Cannot read property 'emit' of null error (#34114)
* Use state.eventBridge for errors only if angular editor (some SQL data sources are still listening on this) * Update public/app/features/explore/state/query.ts * Update public/app/features/explore/state/query.ts
This commit is contained in:
parent
edcefe1c8e
commit
31c1fc3e6e
@ -660,8 +660,10 @@ export const processQueryResponse = (
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
// For Angular editors
|
// Send error to Angular editors
|
||||||
state.eventBridge.emit(PanelEvents.dataError, error);
|
if (state.datasourceInstance?.components?.QueryCtrl) {
|
||||||
|
state.eventBridge.emit(PanelEvents.dataError, error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!request) {
|
if (!request) {
|
||||||
@ -673,7 +675,6 @@ export const processQueryResponse = (
|
|||||||
// Send legacy data to Angular editors
|
// Send legacy data to Angular editors
|
||||||
if (state.datasourceInstance?.components?.QueryCtrl) {
|
if (state.datasourceInstance?.components?.QueryCtrl) {
|
||||||
const legacy = series.map((v) => toLegacyResponseData(v));
|
const legacy = series.map((v) => toLegacyResponseData(v));
|
||||||
|
|
||||||
state.eventBridge.emit(PanelEvents.dataReceived, legacy);
|
state.eventBridge.emit(PanelEvents.dataReceived, legacy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user