Dashboard: Annotations - Fix issue of `angularEditorLoader` when angular is not supported (#93583)

Dashboard: Annotations - Fix issue of angularEditorLoader when angular is not supported
pull/93248/head
Alexa V 10 months ago committed by GitHub
parent 1a13e7fd95
commit 067ea66cbb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      public/app/features/dashboard-scene/settings/annotations/AngularEditorLoader.tsx

@ -1,7 +1,7 @@
import { PureComponent } from 'react';
import { AnnotationQuery, DataSourceApi } from '@grafana/data';
import { AngularComponent, getAngularLoader } from '@grafana/runtime';
import { AngularComponent, config, getAngularLoader } from '@grafana/runtime';
export interface Props {
annotation: AnnotationQuery;
@ -29,7 +29,9 @@ export class AngularEditorLoader extends PureComponent<Props> {
}
componentDidMount() {
if (this.ref) {
// check if angular support is enabled in the instance
const isAngularEnabled = config.angularSupportEnabled;
if (this.ref && isAngularEnabled) {
this.loadAngular();
}
}

Loading…
Cancel
Save