From 1b56560ceae7f0e38e74ee2dec879ce16f1e8b34 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 21 May 2021 13:17:35 +0100 Subject: [PATCH] Fix issue on hot reload when user object was null --- packages/builder/src/pages/builder/portal/apps/index.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index 1729efe101..7857cd658f 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -41,8 +41,8 @@ const enrichedApps = apps.map(app => ({ ...app, deployed: app.status === AppStatus.DEPLOYED, - lockedYou: app.lockedBy?.email === user.email, - lockedOther: app.lockedBy && app.lockedBy.email !== user.email, + lockedYou: app.lockedBy && app.lockedBy.email === user?.email, + lockedOther: app.lockedBy && app.lockedBy.email !== user?.email, })) if (sortBy === "status") { return enrichedApps.sort((a, b) => {