Skip to content

Commit

Permalink
fix: Avoid reload on error
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Knorr <[email protected]>
  • Loading branch information
juliusknorr committed Sep 11, 2024
1 parent 50b5e00 commit 596642d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/collaboration/Portal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down Expand Up @@ -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
}
}
Expand Down

0 comments on commit 596642d

Please sign in to comment.