[Bugfix] Cannot read properties of null (.split())

This commit is contained in:
Matej Glasnák committed 2024-09-18 17:59:56 +02:00
1 parent 2ffa3e24c8
commit e1e46a5c0b
87 files changed
+186 -78

No files matched your search

+5 -2
View File
@@ -35,7 +35,7 @@ export default {
this.$events.on('onSearch', (search) => {
if (!search?.length)
return
this.search = search
this.onSearch(search)
})
@@ -65,7 +65,7 @@ export default {
this.$events.off('on-mastertask-edited')
this.$events.off('on-mastertask-deleted')
},
methods: {
onSearch: debounce(async function (search, reset = true) {
try {
@@ -76,6 +76,9 @@ export default {
this.searchResults = {mastertasks: mastertasks.data, subtasks: subtasks.data, teams: teams.data}
} catch (error) {
this.$toast.error(this.$parseError(error))
if (process.env.NODE_ENV === 'development')
console.log('[serach.vue] Error: ', error)
this.searchResults = {error}
}
}, 300)