diff options
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt b/plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt index fef55dd2..ce57d28c 100644 --- a/plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt +++ b/plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt @@ -6,6 +6,9 @@ object SameMethodNamePageMergerStrategy : PageMergerStrategy { override fun tryMerge(pages: List<PageNode>, path: List<String>): List<PageNode> { val name = pages.first().name val members = pages.filterIsInstance<MemberPageNode>() + + if (members.isEmpty()) return pages + val others = pages.filterNot { it is MemberPageNode } val resChildren = members.flatMap { it.children }.distinct() |