Skip to content

Commit 900ee9e

Browse files
authoredNov 22, 2024
ktl-1758 fix: fix filter notification duplication (#3932)
1 parent 7361d4c commit 900ee9e

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed
 

‎dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/platform-content-handler.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -313,14 +313,18 @@ function refreshPlaygroundSamples() {
313313

314314
function refreshNoContentNotification() {
315315
const element = document.getElementsByClassName("main-content")[0]
316+
const filteredMessage = document.querySelector(".filtered-message")
317+
316318
if(filteringContext.activeFilters.length === 0){
317319
element.style.display = "none";
318320

319-
const appended = document.createElement("div")
320-
appended.className = "filtered-message"
321-
appended.innerText = "All documentation is filtered, please adjust your source set filters in top-right corner of the screen"
322-
sourcesetNotification = appended
323-
element.parentNode.prepend(appended)
321+
if (!filteredMessage) {
322+
const appended = document.createElement("div")
323+
appended.className = "filtered-message"
324+
appended.innerText = "All documentation is filtered, please adjust your source set filters in top-right corner of the screen"
325+
sourcesetNotification = appended
326+
element.parentNode.prepend(appended)
327+
}
324328
} else {
325329
if(sourcesetNotification) sourcesetNotification.remove()
326330
element.style.display = "block"

0 commit comments

Comments
 (0)