Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Commit 616bf32

Browse files
Add empty inserts to HtmlFragment apply methods
1 parent d5ca649 commit 616bf32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tyrian-next/src/main/scala/tyrian/next/HtmlFragment.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ object HtmlFragment:
106106
* most common way to create fragments when you have individual elements to include.
107107
*/
108108
def apply(markup: Elem[GlobalMsg]*): HtmlFragment =
109-
HtmlFragment(Batch.fromSeq(markup))
109+
HtmlFragment(Batch.fromSeq(markup), emptyInserts)
110110

111111
/** Creates an HtmlFragment containing only top-level ui elements, with no marker inserts. The elements will be
112112
* rendered directly as part of the fragment's markup when resolved by an HtmlRoot.
@@ -118,7 +118,7 @@ object HtmlFragment:
118118
* the most common way to create fragments when you have individual elements to include.
119119
*/
120120
def apply(markup: UIElement[?]*)(using Theme): HtmlFragment =
121-
HtmlFragment(Batch.fromSeq(markup).map(_.toHtml))
121+
HtmlFragment(Batch.fromSeq(markup).map(_.toHtml), emptyInserts)
122122

123123
/** Creates an HtmlFragment that contains only insert data for a specific marker, with no top-level markup. When
124124
* resolved, these elements will replace any Marker with the matching MarkerId in the final DOM tree.

0 commit comments

Comments
 (0)