diff --git a/src/main/kotlin/fr/username404/website/subpages/Subpage.kt b/src/main/kotlin/fr/username404/website/subpages/Subpage.kt index 2f31185..313a895 100644 --- a/src/main/kotlin/fr/username404/website/subpages/Subpage.kt +++ b/src/main/kotlin/fr/username404/website/subpages/Subpage.kt @@ -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 + ) ) }