aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-02-27 13:10:18 +0100
committerKamil Doległo <kamilok1965@interia.pl>2020-02-27 13:10:18 +0100
commit463996144e99055203a0205700e7a5be5d970067 (patch)
tree889fd9da80813aa1009c6a66370c8fbd896a33f0
parent16163f30353a6a17d3c038c5ec1f00c5b32f1f80 (diff)
downloaddokka-463996144e99055203a0205700e7a5be5d970067.tar.gz
dokka-463996144e99055203a0205700e7a5be5d970067.tar.bz2
dokka-463996144e99055203a0205700e7a5be5d970067.zip
Fix SameMethodNamePageMergerStrategy
-rw-r--r--plugins/base/src/main/kotlin/transformers/pages/merger/SameMethodNamePageMergerStrategy.kt3
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()