Skip to content

Commit

Permalink
Merge pull request #190 from Neovici/feature/fix-tagged
Browse files Browse the repository at this point in the history
fix(tagged): 0 gets interpolated as empty string
  • Loading branch information
megheaiulian authored Nov 19, 2024
2 parents a378948 + 5e5e0b9 commit 6d5a662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tagged.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const tagged = (
strings: TemplateStringsArray,
...values: (string | number)[]
) => strings.flatMap((s, i) => [s, values[i] || '']).join('');
) => strings.flatMap((s, i) => [s, values[i] ?? '']).join('');

0 comments on commit 6d5a662

Please sign in to comment.