diff --git a/src/Editor.tsx b/src/Editor.tsx index b6a54a9..12c90a4 100644 --- a/src/Editor.tsx +++ b/src/Editor.tsx @@ -12,7 +12,6 @@ type EditorProps = { customFetcher?: (url: string) => Promise; variables?: Variables; variablesInputURLs?: string[]; - SDMXInputURLs?: string[]; tools: Tools; onListErrors?: (errors: Error[]) => void; height?: string; @@ -28,7 +27,6 @@ const Editor = ({ customFetcher, variables, variablesInputURLs, - SDMXInputURLs, tools, height = "50vh", width = "100%", @@ -109,7 +107,7 @@ const Editor = ({ setReady(true); }); } - }, [variablesInputURLs, SDMXInputURLs]); + }, [variablesInputURLs]); if (!ready) return null; diff --git a/src/utils/providers.ts b/src/utils/providers.ts index 46002a3..371c719 100644 --- a/src/utils/providers.ts +++ b/src/utils/providers.ts @@ -52,8 +52,10 @@ export const getEditorWillMount = const { id } = tools; return (monaco: typeof EditorApi) => { monaco.languages.register({ id }); - const tokensProvider: TokensProvider = new TokensProvider(tools); - monaco.languages.setMonarchTokensProvider(id, tokensProvider.monarchLanguage()); + if (tools.monarchDefinition) { + const tokensProvider: TokensProvider = new TokensProvider(tools); + monaco.languages.setMonarchTokensProvider(id, tokensProvider.monarchLanguage()); + } monaco.editor.defineTheme(id, getTheme()); monaco.editor.defineTheme("vtl-default", getVtlTheme("vtl-default")); monaco.editor.defineTheme("vtl-light", getVtlTheme("vtl-light"));