Skip to content

Commit

Permalink
fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
flashdesignory committed Aug 2, 2024
1 parent 8145cce commit c6d6dd2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
);
});
}

Expand Down

0 comments on commit c6d6dd2

Please sign in to comment.