SidebarList: fix sorting

This commit is contained in:
Liam Fitzgerald 2021-06-22 05:42:44 +10:00
parent f8d56a86c4
commit fac22be28a
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB

View File

@ -28,8 +28,8 @@ function sidebarSort(
const lastUpdated = (a: string, b: string) => {
const aAssoc = associations[a];
const bAssoc = associations[b];
const aResource = aAssoc.resource;
const bResource = bAssoc.resource;
const aResource = aAssoc?.resource;
const bResource = bAssoc?.resource;
const aUpdated = a.startsWith('~')
? (unreads?.[`/ship/~${window.ship}/dm-inbox`]?.[`/${patp2dec(a)}`]?.last || 0)