Skip to content

Commit

Permalink
pin isArray
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Jun 7, 2024
1 parent cfecbb4 commit 7b5b912
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const escapeFunction = (key) => {
return escapeDictionary[key];
};

const arrayIsArray = Array.isArray;

/**
* @param {{ raw: string[] }} literals Tagged template literals.
* @param {...any} expressions Expressions to interpolate.
Expand All @@ -32,7 +34,7 @@ const html = ({ raw: literals }, ...expressions) => {
? ""
: typeof expression === "string"
? expression
: Array.isArray(expression)
: arrayIsArray(expression)
? expression.join("")
: `${expression}`;

Expand Down

0 comments on commit 7b5b912

Please sign in to comment.