Skip to content

Commit cabfa68

Browse files
authored
Fix: Remove the duplicate logo (#17170)
- I added an orElse to the snippet so that the dark logo works and there is no duplicate logo. ### Before <img width="569" alt="Screenshot 2023-03-29 at 14 51 09" src="https://user-images.githubusercontent.com/44496264/228541357-77ca6c2a-4413-45fd-a283-40f304d88c4a.png"> ### After <img width="569" alt="Screenshot 2023-03-29 at 14 48 22" src="https://user-images.githubusercontent.com/44496264/228541334-c9a3eccc-1d4a-475b-b03b-3698bde162fb.png"> Fixes: #16693
1 parent 2e30211 commit cabfa68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scaladoc/src/dotty/tools/scaladoc/renderers/HtmlRenderer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,11 @@ class HtmlRenderer(rootPackage: Member, members: Map[DRI, Member])(using ctx: Do
207207
}
208208

209209
val darkProjectLogoElem =
210-
darkProjectLogo.flatMap {
210+
darkProjectLogo.orElse(projectLogo).flatMap {
211211
case Resource.File(path, _) =>
212212
Some(span(id := "dark-project-logo", cls := "project-logo")(img(src := resolveRoot(link.dri, path))))
213213
case _ => None
214-
}.orElse(projectLogoElem)
214+
}
215215

216216
val parentsHtml =
217217
val innerTags = parents.flatMap[TagArg](b => Seq(

0 commit comments

Comments
 (0)