Chore: Avoid NPE with annotations query (#82216)

pull/82271/head
Ryan McKinley 2 years ago committed by GitHub
parent 1f208cd8ae
commit f60b5ecec4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      public/app/plugins/datasource/grafana/datasource.ts

@ -216,7 +216,7 @@ export class GrafanaDatasource extends DataSourceWithBackend<GrafanaQuery> {
if (target.type === GrafanaAnnotationType.Dashboard) {
// if no dashboard id yet return
if (!options.dashboard.uid) {
if (!options.dashboard?.uid) {
return Promise.resolve({ data: [] });
}
// filter by dashboard id

Loading…
Cancel
Save