From cc4e991aee2c211c3d265c88cb5ad26890b02af1 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Wed, 12 Jun 2024 15:25:52 +0200 Subject: [PATCH] fix(update): respect falsy value of `onCreate` --- src/update.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/update.ts b/src/update.ts index 8d5453d..9452bc4 100644 --- a/src/update.ts +++ b/src/update.ts @@ -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."); }