Skip to content

Commit 9e020ed

Browse files
Fix 'Maximum call stack size exceeded' during run function
1 parent e355bc2 commit 9e020ed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/extension.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ let channel: vscode.OutputChannel;
99

1010
function run(file: string | vscode.Uri | null | undefined) {
1111
if (!file) {
12-
run(vscode.window.activeTextEditor?.document.uri);
12+
if (!vscode.window.activeTextEditor) return;
13+
run(vscode.window.activeTextEditor.document.uri);
1314
return;
1415
}
1516

@@ -254,7 +255,7 @@ class Worker implements vscode.Disposable {
254255
constructor(
255256
private readonly workspace: vscode.WorkspaceFolder,
256257
private readonly statusProvider: StatusProvider,
257-
) {}
258+
) { }
258259

259260
workspaceHas(file: vscode.Uri): boolean {
260261
return file.fsPath.startsWith(this.workspace.uri.fsPath);

0 commit comments

Comments
 (0)