diff --git a/packages/web/src/appobj/CloudContentAppObject.svelte b/packages/web/src/appobj/CloudContentAppObject.svelte index d83e26ea5..7c811be1f 100644 --- a/packages/web/src/appobj/CloudContentAppObject.svelte +++ b/packages/web/src/appobj/CloudContentAppObject.svelte @@ -25,7 +25,10 @@ switch (data.type) { case 'connection': const conn = await apiCall('connections/get', { conid: data.conid }); - $cloudConnectionsStore[data.conid] = conn; + $cloudConnectionsStore = { + ...$cloudConnectionsStore, + [data.conid]: conn, + }; openConnection(conn); break; } @@ -34,6 +37,7 @@ {#if data.conid && $cloudConnectionsStore[data.conid]} { + const currentConid = $currentDatabase?.connection?._id; + if (currentConid?.startsWith('cloud://') && !$cloudConnectionsStore[currentConid]) { + loadCloudConnection(currentConid); + } + });