Skip to content

Commit 78584dc

Browse files
committed
Fix preact layout
1 parent 09a966d commit 78584dc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/preact/src/layouts/root.layout.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ export default function defaultRootLayout ({
4949
${render(html`
5050
<body class="safe-area-inset">
5151
<main class="mine-layout app-main">
52-
${typeof children === 'string' ? html([children]) : children /* Support both uhtml and string children. Optional. */}
52+
${typeof children === 'string'
53+
? html`<main class="mine-layout app-main" dangerouslySetInnerHTML="${{ __html: children }}"/>`
54+
: html`<main class="mine-layout app-main">${children}</main>`
55+
}
5356
</main>
5457
</body>
5558
`)}

0 commit comments

Comments
 (0)