Skip to content

Commit

Permalink
Fix minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoLaval committed Oct 10, 2023
1 parent fa0a688 commit 5040985
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ type EditorProps = {
customFetcher?: (url: string) => Promise<any>;
variables?: Variables;
variablesInputURLs?: string[];
SDMXInputURLs?: string[];
tools: Tools;
onListErrors?: (errors: Error[]) => void;
height?: string;
Expand All @@ -28,7 +27,6 @@ const Editor = ({
customFetcher,
variables,
variablesInputURLs,
SDMXInputURLs,
tools,
height = "50vh",
width = "100%",
Expand Down Expand Up @@ -109,7 +107,7 @@ const Editor = ({
setReady(true);
});
}
}, [variablesInputURLs, SDMXInputURLs]);
}, [variablesInputURLs]);

if (!ready) return null;

Expand Down
6 changes: 4 additions & 2 deletions src/utils/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit 5040985

Please sign in to comment.