Skip to content

Commit 4d80bf9

Browse files
authored
fix: fix problem panel cannot open after hiding (#239)
1 parent 74f8976 commit 4d80bf9

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/controller/problems.tsx

+5-7
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,15 @@ export class ProblemsController
3737

3838
private showHideProblems() {
3939
const { panel } = this.layoutService.getState();
40-
if (panel.hidden) {
40+
const { current } = this.panelService.getState();
41+
42+
if (panel.hidden || current?.id === builtInPanelProblems().id) {
4143
this.monacoService.commandService.executeCommand(
4244
QuickTogglePanelAction.ID
4345
);
4446
}
45-
const { current } = this.panelService.getState();
46-
if (current?.id !== builtInPanelProblems().id) {
47-
this.panelService.open(builtInPanelProblems());
48-
} else {
49-
this.layoutService.setPanelHidden();
50-
}
47+
48+
this.panelService.open(builtInPanelProblems());
5149
}
5250

5351
public onClick = (e: React.MouseEvent, item: IStatusBarItem) => {

0 commit comments

Comments
 (0)