From 596642d08b984dc4c9947fbf112ee0360ffe1f74 Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Wed, 11 Sep 2024 08:53:29 +0200 Subject: [PATCH] fix: Avoid reload on error Signed-off-by: Julius Knorr --- src/collaboration/Portal.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/collaboration/Portal.ts b/src/collaboration/Portal.ts index a866625..4c50204 100644 --- a/src/collaboration/Portal.ts +++ b/src/collaboration/Portal.ts @@ -66,9 +66,9 @@ export class Portal { handleConnectionError = () => { alert( - 'Failed to connect to the whiteboard server. Redirecting to Files app.', + 'Failed to connect to the whiteboard server.', ) - window.location.href = '/index.php/apps/files/files' + OCA.Viewer?.close() } disconnectSocket = () => { @@ -175,7 +175,8 @@ export class Portal { return token } catch (error) { console.error('Error refreshing JWT:', error) - window.location.href = '/index.php/apps/files/files' + alert(error.message) + OCA.Viewer?.close() return null } }