aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Formats
diff options
context:
space:
mode:
authorZubakov Aleksey <aleks.zubakov@gmail.com>2018-08-17 13:00:06 +0300
committerZubakov Aleksey <aleks.zubakov@gmail.com>2018-08-17 15:47:47 +0300
commit1f45cac76a79abb6eaad99b541234cbf34fbce9c (patch)
treebab06b6ff330b6811ba85f9a48a00dfff82d5646 /core/src/main/kotlin/Formats
parent39b2f9faf768c185f6bd42a9fde18ceaecb34990 (diff)
downloaddokka-1f45cac76a79abb6eaad99b541234cbf34fbce9c.tar.gz
dokka-1f45cac76a79abb6eaad99b541234cbf34fbce9c.tar.bz2
dokka-1f45cac76a79abb6eaad99b541234cbf34fbce9c.zip
Merger platforms bug fix, refactoring
Diffstat (limited to 'core/src/main/kotlin/Formats')
-rw-r--r--core/src/main/kotlin/Formats/StructuredFormatService.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt
index 41c8f29a..b810dfca 100644
--- a/core/src/main/kotlin/Formats/StructuredFormatService.kt
+++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt
@@ -404,6 +404,8 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
fun String.isKotlinVersion() = this.startsWith("Kotlin")
+ if (platforms.count() == 0) return emptySet()
+
// Calculating common platforms for items
return platforms.reduce { result, platformsOfItem ->
val otherKotlinVersion = result.find { it.isKotlinVersion() }