diff --git a/apps/red-ui/src/app/screens/admin/dictionary-overview-screen/dictionary-overview-screen.component.ts b/apps/red-ui/src/app/screens/admin/dictionary-overview-screen/dictionary-overview-screen.component.ts index 673f7d11c..d6f3ad809 100644 --- a/apps/red-ui/src/app/screens/admin/dictionary-overview-screen/dictionary-overview-screen.component.ts +++ b/apps/red-ui/src/app/screens/admin/dictionary-overview-screen/dictionary-overview-screen.component.ts @@ -10,8 +10,6 @@ import { reference } from '../../../utils/functions'; import { debounce } from '../../../utils/debounce'; declare var ace; -ace.config.set('basePath', '/assets/ace-editor/'); -const Range = ace.acequire('ace/range').Range; @Component({ selector: 'redaction-dictionary-overview-screen', @@ -46,6 +44,7 @@ export class DictionaryOverviewScreenComponent { private readonly _activatedRoute: ActivatedRoute, private readonly _appStateService: AppStateService ) { + ace.config.set('basePath', '/assets/ace-editor/'); this._activatedRoute.params.subscribe((params) => { this.dictionary = this._appStateService.dictionaryData[params.type]; if (!this.dictionary) { @@ -96,6 +95,7 @@ export class DictionaryOverviewScreenComponent { }); this.activeSearchMarkers = []; + const Range = ace.acequire('ace/range').Range; for (const position of this.searchPositions) { this.activeSearchMarkers.push( this.editorComponent @@ -133,6 +133,7 @@ export class DictionaryOverviewScreenComponent { } } + const Range = ace.acequire('ace/range').Range; for (const i of this.changedLines) { this.activeEditMarkers.push(this.editorComponent.getEditor().getSession().addMarker(new Range(i, 0, i, 1), 'changed-row-marker', 'fullLine')); }