pull/3854/head
Avin 2023-03-21 20:29:23 +05:30 committed by GitHub
parent 38731c726a
commit 5495aa8e01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ export const Editor: VFC = () => {
useEffect(() => { useEffect(() => {
if (monacoEl) { if (monacoEl) {
setEditor((editor) => { setEditor((editor) => {
if (editor) return; if (editor) return editor;
return monaco.editor.create(monacoEl.current!, { return monaco.editor.create(monacoEl.current!, {
value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'), value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),