Handle empty heads in Subpage.kt
This commit is contained in:
parent
70a356208d
commit
84b8275179
|
@ -14,6 +14,8 @@ data class Subpage(
|
|||
) {
|
||||
fun open(): Document = window.document.open(
|
||||
type = "text/html",
|
||||
replace = head.map { it.innerHTML }.reduce { previous, current -> previous + "\n" + current }
|
||||
replace = (head.map { it.innerHTML }.reduceOrNull { previous, current -> previous + '\n' + current } ?: "").plus(
|
||||
'\n' + content.innerHTML
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue