Skip to content

Commit 9ccacf2

Browse files
committed
relax constrain of string array join
1 parent 5de3728 commit 9ccacf2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,10 @@ function renderTags(tags: Array<TagDescription>) {
245245
.join("");
246246

247247
let children = tag.props.children;
248-
// check if children is an array of strings
249-
// in Server Side Rendering, strings are concatenated with comma which is not what we want
250-
// we should join them manually instead
251-
if (Array.isArray(children) && children.every(child => typeof child === "string")) {
248+
249+
if (Array.isArray(children)) {
250+
// in JavaScript, strings are concatenated with comma which is not what we want
251+
// we should join them manually instead
252252
children = children.join("");
253253
}
254254
if (tag.setting?.close) {

0 commit comments

Comments
 (0)