diff --git a/public/app/features/dashboard-scene/settings/annotations/AngularEditorLoader.tsx b/public/app/features/dashboard-scene/settings/annotations/AngularEditorLoader.tsx index edd42f4b7ff..5f24391fbbb 100644 --- a/public/app/features/dashboard-scene/settings/annotations/AngularEditorLoader.tsx +++ b/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 { } componentDidMount() { - if (this.ref) { + // check if angular support is enabled in the instance + const isAngularEnabled = config.angularSupportEnabled; + if (this.ref && isAngularEnabled) { this.loadAngular(); } }