Skip to content

Commit 32641b9

Browse files
mortalYoungmumiao
authored andcommitted
fix: fix switch panels between problem and output
1 parent 60a66ab commit 32641b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/workbench/panelService.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'reflect-metadata';
22
import { singleton, container } from 'tsyringe';
33
import { editor as MonacoEditor } from 'monaco-editor';
4+
import { StandaloneEditor } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor';
45
import { cloneDeepWith, cloneDeep } from 'lodash';
56
import pickBy from 'lodash/pickBy';
67
import { Component } from 'mo/react';
@@ -194,7 +195,7 @@ export class PanelService extends Component<IPanel> implements IPanelService {
194195
if (
195196
value &&
196197
typeof value === 'object' &&
197-
value.constructor.name === 'StandaloneEditor'
198+
value instanceof StandaloneEditor
198199
) {
199200
return value;
200201
}

0 commit comments

Comments
 (0)