From c6d6dd2eb0ae80f63a83d77667f03843da4124bb Mon Sep 17 00:00:00 2001 From: Thorsten Kober Date: Fri, 2 Aug 2024 11:16:01 -0400 Subject: [PATCH] fix it --- src/utils/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index fa76f55..2834526 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -56,7 +56,9 @@ export function formatCode( ) { return code.replace(/{{(.*?)}}/g, (match) => { const name = match.split(/{{|}}/).filter(Boolean)[0]; - return JSON.stringify(args?.[name] ?? optionalParams?.[name]); + return JSON.stringify( + args?.[name] !== undefined ? args?.[name] : optionalParams?.[name], + ); }); }