mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #2769 from overleaf/jpa-fix-socket-io-v2-ie11
[frontend] ConnectionManager: ie11 fix for socket.io v2 and wsUrl GitOrigin-RevId: 9692a1b7c6b0278e8069013a68990b69694ba549
This commit is contained in:
parent
dd59d8c242
commit
f84ef4e999
1 changed files with 9 additions and 1 deletions
|
@ -111,9 +111,17 @@ define(['./SocketIoShim'], function(SocketIoShim) {
|
|||
parsedURL = new URL(this.wsUrl || '/socket.io', window.location)
|
||||
} catch (e) {
|
||||
// hello IE11
|
||||
if (
|
||||
this.wsUrl &&
|
||||
this.wsUrl.indexOf('/') !== 0 &&
|
||||
!window.location.href.match(/ws=fallback/)
|
||||
) {
|
||||
// do not even try parsing the wsUrl, use the fallback
|
||||
window.location = window.location.href + '?ws=fallback'
|
||||
}
|
||||
parsedURL = {
|
||||
origin: null,
|
||||
pathname: '/socket.io'
|
||||
pathname: this.wsUrl || '/socket.io'
|
||||
}
|
||||
}
|
||||
this.ide.socket = SocketIoShim.connect(
|
||||
|
|
Loading…
Reference in a new issue