diff options
Diffstat (limited to 'core/src/main/kotlin/pages')
-rw-r--r-- | core/src/main/kotlin/pages/PageNodes.kt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/main/kotlin/pages/PageNodes.kt b/core/src/main/kotlin/pages/PageNodes.kt index 176c0993..a91887b4 100644 --- a/core/src/main/kotlin/pages/PageNodes.kt +++ b/core/src/main/kotlin/pages/PageNodes.kt @@ -92,6 +92,11 @@ class PackagePageNode( override val children: List<PageNode>, override val embeddedResources: List<String> = listOf() ) : PackagePage { + + init { + require(name.isNotBlank()) { "PackagePageNode.name cannot be blank" } + } + override fun modified(name: String, children: List<PageNode>): PackagePageNode = modified(name = name, content = this.content, children = children) |