Skip to content

Commit

Permalink
Fix JS falsy comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperAuguste committed Feb 15, 2024
1 parent 88cbb5f commit e3cc045
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/zls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export async function activate(context: ExtensionContext) {
outputChannel = window.createOutputChannel("Zig Language Server");

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

const zigConfig = vscode.workspace.getConfiguration("zig");
if (!zigConfig.get<string>("path")) return;
if (zigConfig.get<string>("path") === undefined) return;
const zlsConfig = workspace.getConfiguration("zig.zls");
if (!zlsConfig.get<string>("path")) return;
if (zlsConfig.get<string>("path") === undefined) return;
if (zlsConfig.get<boolean>("checkForUpdate") && shouldCheckUpdate(context, "zlsUpdate")) {
await checkUpdate(context);
}
Expand Down

0 comments on commit e3cc045

Please sign in to comment.