Fix: WebUI reconnect

There was a problem with hashtag based urls. More a browser fault in my view
This commit is contained in:
brindosch
2019-07-29 01:40:44 +02:00
committed by Paulchen-Panther
parent 21206af916
commit f5d0fe34a8

View File

@@ -41,7 +41,14 @@ function tryReconnect()
$.ajax({ url: connURL }).done(function(data) {
window.clearInterval(connectionTimer);
window.location.href = connURL;
if(reconnectInterval <= 2000){
let url = connURL;
if (window.connURL.includes("#"))
url = window.connURL.slice(0,window.connURL.indexOf("#"));
window.location.replace(url);
} else {
window.location.reload();
}
})
.fail( function( jqXHR, textStatus ) {
count++;