We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4954fe commit 5de3728Copy full SHA for 5de3728
1 file changed
src/index.tsx
@@ -243,7 +243,14 @@ function renderTags(tags: Array<TagDescription>) {
243
}"`
244
)
245
.join("");
246
- const children = tag.props.children;
+
247
+ 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")) {
252
+ children = children.join("");
253
+ }
254
if (tag.setting?.close) {
255
return `<${tag.tag} data-sm="${tag.id}"${props}>${
256
// @ts-expect-error
0 commit comments