From 067ea66cbb1905122a2ec055b55a6c11c280f253 Mon Sep 17 00:00:00 2001 From: Alexa V <239999+axelavargas@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:17:59 +0200 Subject: [PATCH] Dashboard: Annotations - Fix issue of `angularEditorLoader` when angular is not supported (#93583) Dashboard: Annotations - Fix issue of angularEditorLoader when angular is not supported --- .../settings/annotations/AngularEditorLoader.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); } }