diff --git a/src/_components/Editor/Editor.tsx b/src/_components/Editor/Editor.tsx index e8b7778..b2a19db 100644 --- a/src/_components/Editor/Editor.tsx +++ b/src/_components/Editor/Editor.tsx @@ -255,8 +255,8 @@ const Editor = React.memo(function EditorC({ id={colabID} // @ts-ignore providerFactory={(id, yjsDocMap) => { - // problems with wss for now, try to use ws - const protocol = 'ws:'; + const protocol = + window.location.protocol === 'https:' ? 'wss:' : 'ws:'; let doc = yjsDocMap.get(id); if (!doc) { doc = new Y.Doc();