Skip to content

Commit c3cbdfb

Browse files
author
lhy
committed
避免空入参接口调用
1 parent 96126e3 commit c3cbdfb

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/PawSQLSidebarProvider.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,12 @@ export class PawSQLTreeProvider
350350
try {
351351
// Reset all validation states first
352352
this.isConfigValid = false;
353-
353+
if (!backendUrl || !frontendUrl || !apiKey) {
354+
this.isConfigValid = false;
355+
vscode.commands.executeCommand("setContext", "isConfigured", false);
356+
this.workspaces = [];
357+
return;
358+
}
354359
const backendResult = await validateBackend(backendUrl ?? "");
355360

356361
const isBackendConnected = backendResult.isAvailable;

0 commit comments

Comments
 (0)