1
0
Fork 0
mirror of synced 2024-10-05 12:34:50 +13:00

turn off websockets in client lib in cloud

This commit is contained in:
Martin McKeaveney 2022-09-22 15:04:20 +01:00
parent 60dbcc433c
commit 9583db47c8

View file

@ -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
}