Skip to content

Commit e3cc045

Browse files
committed
Fix JS falsy comparison
1 parent 88cbb5f commit e3cc045

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/zls.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ export async function activate(context: ExtensionContext) {
245245
outputChannel = window.createOutputChannel("Zig Language Server");
246246

247247
vscode.commands.registerCommand("zig.zls.install", async () => {
248-
if (!workspace.getConfiguration("zig").get<string>("path")) {
248+
if (workspace.getConfiguration("zig").get<string>("path") === undefined) {
249249
window.showErrorMessage("This command cannot be run without setting 'zig.path'.", { modal: true });
250250
return;
251251
}
@@ -282,9 +282,9 @@ export async function activate(context: ExtensionContext) {
282282
});
283283

284284
const zigConfig = vscode.workspace.getConfiguration("zig");
285-
if (!zigConfig.get<string>("path")) return;
285+
if (zigConfig.get<string>("path") === undefined) return;
286286
const zlsConfig = workspace.getConfiguration("zig.zls");
287-
if (!zlsConfig.get<string>("path")) return;
287+
if (zlsConfig.get<string>("path") === undefined) return;
288288
if (zlsConfig.get<boolean>("checkForUpdate") && shouldCheckUpdate(context, "zlsUpdate")) {
289289
await checkUpdate(context);
290290
}

0 commit comments

Comments
 (0)