Skip to content

Commit

Permalink
fix(update): respect falsy value of onCreate
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jun 12, 2024
1 parent 6b37c98 commit cc4e991
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function updateConfig(
opts.configFile + (opts.createExtension || ".ts"),
);
const createResult =
(await opts.onCreate?.({ configFile: configFile })) || true;
(await opts.onCreate?.({ configFile: configFile })) ?? true;
if (!createResult) {
throw new Error("Config file creation aborted.");
}
Expand Down

0 comments on commit cc4e991

Please sign in to comment.