diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index d27551c3c..ea5637944 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -305,10 +305,11 @@ const conversation = { topLevel() { const topLevel = this.conversation.reduce( (tl, cur) => - tl.filter((k) => - this.getReplies(cur.id) - .map((v) => v.id) - .includes(k.id), + tl.filter( + (k) => + !this.getReplies(cur.id) + .map((v) => v.id) + .includes(k.id), ), this.conversation, ) diff --git a/src/i18n/messages.js b/src/i18n/messages.js index db80f7ac3..51b8d920c 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -18,7 +18,7 @@ const hasLanguageFile = (code) => languages.includes(code) const languageFileMap = import.meta.glob(['./*.json', '!./en.json']) -const loadLanguageFile = (code) => { +const loadLanguageFile = async (code) => { const jsonName = langCodeToJsonName(code) if (jsonName === 'en') return { default: enMessages } return languageFileMap[`./${jsonName}.json`]() diff --git a/src/modules/users.js b/src/modules/users.js index c4af0fb36..9e24c1bdd 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -73,7 +73,7 @@ const mergeArrayLength = (oldValue, newValue) => { } } -const getNotificationPermission = () => { +const getNotificationPermission = async () => { const Notification = window.Notification if (!Notification) return null @@ -383,7 +383,7 @@ const users = { mutations, getters, actions: { - fetchUserIfMissing(store, id) { + async fetchUserIfMissing(store, id) { const user = store.getters.findUser(id) if (!user) { return store.dispatch('fetchUser', id)