mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-23 17:32:20 +00:00
Merge pull request #2735 from overleaf/jpa-try-ws-fallback-on-missing-js
[frontend] ConnectionManager: use fallback backend on missing js blob GitOrigin-RevId: cd5acf17c67d7fd94641411842f31a17942f1385
This commit is contained in:
parent
e54618e7de
commit
e3bd6951cf
1 changed files with 5 additions and 0 deletions
|
@ -35,6 +35,11 @@ define([], function() {
|
|||
this.$scope = $scope
|
||||
this.wsUrl = ide.wsUrl || null // websocket url (if defined)
|
||||
if (typeof io === 'undefined' || io === null) {
|
||||
if (this.wsUrl && !window.location.href.match(/ws=fallback/)) {
|
||||
// if we tried to boot from a custom real-time backend and failed,
|
||||
// try reloading and falling back to the siteUrl
|
||||
window.location = window.location.href + '?ws=fallback'
|
||||
}
|
||||
console.error(
|
||||
'Socket.io javascript not loaded. Please check that the real-time service is running and accessible.'
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue