ui: bug fix

This commit is contained in:
undefined committed 2022-09-29 18:55:18 +08:00
1 parent c0550fc97c
commit 2e050f5851
3 files changed
+2 -3

No files matched your search

@@ -37,7 +37,7 @@ export default connect((state: any) => ({
const { language } = this.props;
const { monaco, registerAction, customOptions } = await load([language]);
const uri = monaco.Uri.parse(`hydro://${UiContext.pdoc.pid || UiContext.pdoc.docId}.${language}`);
this.model = monaco.editor.createModel(value, language, uri);
this.model = monaco.editor.getModel(uri) || monaco.editor.createModel(value, language, uri);
if (this.containerElement) {
const config: monaco.editor.IStandaloneEditorConstructionOptions = {
theme: 'vs-light',
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.40.10",
"version": "4.40.11",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
-1
View File
@@ -2,7 +2,6 @@ declare global {
interface Window {
node_modules: any;
LANGS: Record<string, any>;
}
let UserContext: Record<string, any>;