fixed notification bug

This commit is contained in:
supertiger1234 2019-05-31 19:36:57 +01:00
parent 75fae35000
commit 1a08e6e5d5
2 changed files with 2 additions and 1 deletions

View file

@ -51,6 +51,7 @@ export default {
// gets unopened dms
const notificationsFiltered = notifications.filter(item => {
if (json[item.channelID] && json[item.channelID].server_id) return;
const find = result.find(resFind => {
return resFind.channelID === item.channelID
})

View file

@ -34,7 +34,7 @@ const actions = {
const channels = context.rootState.channelModule.channels;
channelID = Object.keys(channels).find(_channelID => {
return channels[_channelID].recipients[0].uniqueID === uniqueID
return channels[_channelID].recipients && channels[_channelID].recipients.length && channels[_channelID].recipients[0].uniqueID === uniqueID
})
const messages = context.state.messages[channelID];
const channel = channels[channelID];