From 9583db47c829a1aa89acbd0b74341b5f1f65ed16 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 22 Sep 2022 15:04:20 +0100 Subject: [PATCH] turn off websockets in client lib in cloud --- packages/client/src/websocket.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/client/src/websocket.js b/packages/client/src/websocket.js index eb859933f7..b9f9668fde 100644 --- a/packages/client/src/websocket.js +++ b/packages/client/src/websocket.js @@ -1,12 +1,13 @@ -import { builderStore } from "./stores/index.js" +import { builderStore, environmentStore } from "./stores/index.js" import { get } from "svelte/store" import { io } from "socket.io-client" export const initWebsocket = () => { const { inBuilder, location } = get(builderStore) + const { cloud } = get(environmentStore) // Only connect when we're inside the builder preview, for now - if (!inBuilder || !location) { + if (!inBuilder || !location || cloud) { return }