Skip to content

Commit

Permalink
fix: Folder search in root folder was broken
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed Jun 9, 2024
1 parent 06ac437 commit 11cca4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/BookmarksList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default {
// Search folders
const searchFolder = (folder) => {
const results = folder.children.flatMap(searchFolder)
if (this.$store.state.fetchState.query.search.every(term => term.trim() && folder.title.toLowerCase().includes(term.toLowerCase()))) {
if (folder.title && this.$store.state.fetchState.query.search && this.$store.state.fetchState.query.search.every(term => term.trim() && folder.title.toLowerCase().includes(term.toLowerCase()))) {
results.push(folder)
}
return results
Expand Down
2 changes: 1 addition & 1 deletion src/components/Folder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default {
return this.$store.getters.getFolder(this.$store.state.fetchState.query.folder)[0]
},
isTrashbin() {
return this.containingFolder.softDeleted || this.$route.name === this.routes.TRASHBIN
return (this.containingFolder && this.containingFolder.softDeleted) || this.$route.name === this.routes.TRASHBIN
},
permissions() {
return this.$store.getters.getPermissionsForFolder(this.folder.id)
Expand Down

0 comments on commit 11cca4c

Please sign in to comment.