core: allow require module from plugin dir

This commit is contained in:
undefined committed 2023-03-23 20:01:49 +08:00
1 parent f79b8ab0c0
commit 15dba5dd45
4 files changed
+11 -6

No files matched your search

@@ -83,8 +83,8 @@ export default connect(mapStateToProps, mapDispatchToProps)(class ScratchpadTool
super(props);
if (!availableLangs[this.props.editorLang]) {
// preference not allowed
const key = keys.filter((i) => availableLangs[i].pretest)
.find((i) => availableLangs[i].pretest.split('.')[0] === this.props.editorLang.split('.')[0]);
const key = this.props.editorLang ? keys.filter((i) => availableLangs[i].pretest)
.find((i) => availableLangs[i].pretest.split('.')[0] === this.props.editorLang.split('.')[0]) : '';
this.props.setEditorLanguage(key || keys[0]);
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.48.8",
"version": "4.48.9",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "index.ts",