From 3979c108e06aac617e5423029a58a89160c5ef4a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 5 Jun 2023 13:56:54 +0100 Subject: [PATCH] Add more optional chaining --- packages/builder/src/builderStore/websocket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/builderStore/websocket.js b/packages/builder/src/builderStore/websocket.js index 20c495613a..af6d58ee7f 100644 --- a/packages/builder/src/builderStore/websocket.js +++ b/packages/builder/src/builderStore/websocket.js @@ -30,7 +30,7 @@ export const createBuilderWebsocket = appId => { userStore.actions.removeUser(sessionId) }) socket.onOther(BuilderSocketEvent.LockTransfer, ({ userId }) => { - if (userId === get(auth)?.user._id) { + if (userId === get(auth)?.user?._id) { notifications.success("You can now edit screens and automations") store.update(state => ({ ...state,