mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboard: Annotations - Fix issue of angularEditorLoader
when angular is not supported (#93583)
Dashboard: Annotations - Fix issue of angularEditorLoader when angular is not supported
This commit is contained in:
parent
1a13e7fd95
commit
067ea66cbb
@ -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…
Reference in New Issue
Block a user