Skip to content

Commit 48f6fbd

Browse files
committed
Fix add testcases without active editor (regression)
1 parent f18e2f3 commit 48f6fbd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/views/judge/provider/JudgeViewProvider.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ export default class extends BaseViewProvider<ProviderMessage, WebviewMessage> {
161161
};
162162
});
163163

164-
// biome-ignore lint/style/noNonNullAssertion: Caller guarantees there is an active editor and passes a non-empty string
165-
if (file === vscode.window.activeTextEditor!.document.fileName) {
164+
if (file === vscode.window.activeTextEditor?.document.fileName) {
166165
this.deleteAll();
167166
this._timeLimit = data.timeLimit;
168167
for (const testcase of testcases) {

0 commit comments

Comments
 (0)