ui: pretest: ignore default lang missing

This commit is contained in:
undefined committed 2022-05-17 16:59:43 +08:00
1 parent f6cc2a72ff
commit 6cf15ba612
5 files changed
+10 -10

No files matched your search

@@ -93,7 +93,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(class ScratchpadTool
if (UiContext.pdoc.config?.type === 'remote_judge') {
if (availableLangs[this.props.editorLang].pretest) canUsePretest = true;
}
if (availableLangs[this.props.editorLang].pretest === false) canUsePretest = false;
if (availableLangs[this.props.editorLang]?.pretest === false) canUsePretest = false;
return (
<Toolbar>
{canUsePretest && (