Fix issue on hot reload when user object was null

This commit is contained in:
Andrew Kingston 2021-05-21 13:17:35 +01:00
parent bc8be04a32
commit 01b6c443ea
1 changed files with 2 additions and 2 deletions

View File

@ -41,8 +41,8 @@
const enrichedApps = apps.map(app => ({ const enrichedApps = apps.map(app => ({
...app, ...app,
deployed: app.status === AppStatus.DEPLOYED, deployed: app.status === AppStatus.DEPLOYED,
lockedYou: app.lockedBy?.email === user.email, lockedYou: app.lockedBy && app.lockedBy.email === user?.email,
lockedOther: app.lockedBy && app.lockedBy.email !== user.email, lockedOther: app.lockedBy && app.lockedBy.email !== user?.email,
})) }))
if (sortBy === "status") { if (sortBy === "status") {
return enrichedApps.sort((a, b) => { return enrichedApps.sort((a, b) => {