From 463996144e99055203a0205700e7a5be5d970067 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Thu, 27 Feb 2020 13:10:18 +0100 Subject: Fix SameMethodNamePageMergerStrategy --- .../transformers/pages/merger/SameMethodNamePageMergerStrategy.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/base/src/main/kotlin') 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, path: List): List { val name = pages.first().name val members = pages.filterIsInstance() + + if (members.isEmpty()) return pages + val others = pages.filterNot { it is MemberPageNode } val resChildren = members.flatMap { it.children }.distinct() -- cgit