Skip to content

Commit

Permalink
fix: treat Symbol the same as array.join
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Oct 17, 2024
1 parent 945c704 commit dae37b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"devDependencies": {
"@fastify/pre-commit": "^2.1.0",
"c8": "^10.1.2",
"grules": "^0.25.5",
"grules": "^0.25.10",
"tinybench": "^2.9.0",
"typescript": ">=5.6.2"
},
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const html = (literals, ...expressions) => {
let literal = literals.raw[i];
let string = Array.isArray(expressions[i])
? expressions[i].join("")
: String(expressions[i] ?? "");
: `${expressions[i] ?? ""}`;

if (literal && literal.charCodeAt(literal.length - 1) === 33) {
literal = literal.slice(0, -1);
Expand Down

0 comments on commit dae37b0

Please sign in to comment.