mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-01-04 05:19:12 +01:00
Hide empty folders in embeddings search results (#1506)
This commit is contained in:
parent
07f797a5e4
commit
d632cfcde9
@ -2762,6 +2762,12 @@ function updateEmbeddingsList(filter = "") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (toplevel.children.length == 0 && folders.children.length == 0) {
|
||||||
|
// Empty folder
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
let result = document.createElement("div")
|
let result = document.createElement("div")
|
||||||
result.replaceChildren(toplevel, htmlToElement('<br style="clear: both;">'), folders)
|
result.replaceChildren(toplevel, htmlToElement('<br style="clear: both;">'), folders)
|
||||||
return result
|
return result
|
||||||
|
Loading…
Reference in New Issue
Block a user