Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: live base server url. (#5734)

Prateek Shouryac90df623decf
diff --git a/web/core/components/pages/editor/editor-body.tsx b/web/core/components/pages/editor/editor-body.tsx
index c4efaac7bf..faa967b7ef 100644
--- a/web/core/components/pages/editor/editor-body.tsx
+++ b/web/core/components/pages/editor/editor-body.tsx
@@ -115,11 +115,11 @@ export const PageEditorBody: React.FC<Props> = observer((props) => {
const realtimeConfig: TRealtimeConfig | undefined = useMemo(() => {
// Construct the WebSocket Collaboration URL
try {
- const LIVE_SERVER_BASE_URL = LIVE_BASE_URL ?? window.location.origin;
- const WS_LIVE_URL = new URL(`${LIVE_SERVER_BASE_URL}${LIVE_BASE_PATH}`);
+ const LIVE_SERVER_BASE_URL = LIVE_BASE_URL?.trim() || window.location.origin;
+ const WS_LIVE_URL = new URL(LIVE_SERVER_BASE_URL);
const isSecureEnvironment = window.location.protocol === "https:";
WS_LIVE_URL.protocol = isSecureEnvironment ? "wss" : "ws";
- WS_LIVE_URL.pathname = "collaboration";
+ WS_LIVE_URL.pathname = `${LIVE_BASE_PATH}/collaboration`;
// Construct realtime config
return {
url: WS_LIVE_URL.toString(),