optional chaining
This commit is contained in:
parent
0fc8eec293
commit
5ea3d462b9
34 changed files with 68 additions and 77 deletions
|
|
@ -69,8 +69,8 @@ export const useChatsStore = defineStore('chats', {
|
|||
|
||||
if (chat) {
|
||||
const isNewMessage =
|
||||
(chat.lastMessage && chat.lastMessage.id) !==
|
||||
(updatedChat.lastMessage && updatedChat.lastMessage.id)
|
||||
(chat.lastMessage?.id) !==
|
||||
(updatedChat.lastMessage?.id)
|
||||
chat.lastMessage = updatedChat.lastMessage
|
||||
chat.unread = updatedChat.unread
|
||||
chat.updated_at = updatedChat.updated_at
|
||||
|
|
|
|||
|
|
@ -60,8 +60,7 @@ export const useInterfaceStore = defineStore('interface', {
|
|||
},
|
||||
browserSupport: {
|
||||
cssFilter:
|
||||
window.CSS &&
|
||||
window.CSS.supports &&
|
||||
window.CSS?.supports &&
|
||||
(window.CSS.supports('filter', 'drop-shadow(0 0)') ||
|
||||
window.CSS.supports('-webkit-filter', 'drop-shadow(0 0)')),
|
||||
localFonts: typeof window.queryLocalFonts === 'function',
|
||||
|
|
|
|||
|
|
@ -196,9 +196,11 @@ export const _getRecentData = (cache, live, isTest) => {
|
|||
|
||||
export const _getAllFlags = (recent, stale) => {
|
||||
return Array.from(
|
||||
recentStorage = toRaw(recent?.flagStorage)
|
||||
staleStorage = toRaw(stale?.flagStorage)
|
||||
new Set([
|
||||
...Object.keys(toRaw((recent || {}).flagStorage || {})),
|
||||
...Object.keys(toRaw((stale || {}).flagStorage || {})),
|
||||
...Object.keys(recentStorage || {}),
|
||||
...Object.keys(staleStorage || {}),
|
||||
]),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue