diff options
author | Błażej Kardyś <bkardys@virtuslab.com> | 2020-01-20 17:13:28 +0100 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-01-31 15:07:06 +0100 |
commit | 71428219389d5fe429c0bad0bd31b2cda55cdfce (patch) | |
tree | 12a337a7ff55177cc2b4373b063c746310be2793 /core/src/main/kotlin/resolvers/DefaultLocationProvider.kt | |
parent | c3b911f286186a790be607e9b803e3ed63c77289 (diff) | |
download | dokka-71428219389d5fe429c0bad0bd31b2cda55cdfce.tar.gz dokka-71428219389d5fe429c0bad0bd31b2cda55cdfce.tar.bz2 dokka-71428219389d5fe429c0bad0bd31b2cda55cdfce.zip |
Adding changes to HTML UI render
Diffstat (limited to 'core/src/main/kotlin/resolvers/DefaultLocationProvider.kt')
-rw-r--r-- | core/src/main/kotlin/resolvers/DefaultLocationProvider.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/kotlin/resolvers/DefaultLocationProvider.kt b/core/src/main/kotlin/resolvers/DefaultLocationProvider.kt index d7089f96..3412d975 100644 --- a/core/src/main/kotlin/resolvers/DefaultLocationProvider.kt +++ b/core/src/main/kotlin/resolvers/DefaultLocationProvider.kt @@ -38,6 +38,8 @@ open class DefaultLocationProvider( else -> ancestors(node.parent()) + node } + override fun top(): PageNode = pageGraphRoot + protected open fun findInPageGraph(dri: DRI, platforms: List<PlatformData>): PageNode? = pageGraphRoot.dfs { it.dri == dri } @@ -52,7 +54,7 @@ open class DefaultLocationProvider( else -> getPath(pathNode.parent(), path + pathNode.pathName().ifEmpty { "root" }) } - val contextNode = if (context?.children?.isEmpty() == true) context.parent() else context + val contextNode = if (context?.children?.isEmpty() == true && context.parent() != null) context.parent() else context val nodePath = getPath(node).reversed() val contextPath = getPath(contextNode).reversed() |