Skip to content

Commit

Permalink
fix: simplifiy sw.js polling (#10436)
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur- committed Mar 26, 2021
1 parent a685db1 commit b346cf3
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -376,8 +376,7 @@ export class Flow {
// (HTTP error code is ok since it still verifies server's presence).
$wnd.Vaadin.connectionState.state = ConnectionState.RECONNECTING;
const http = new XMLHttpRequest();
const serverRoot = location.pathname || '/';
http.open('HEAD', serverRoot + (serverRoot.endsWith('/') ? '' : ' /') + 'sw.js');
http.open('HEAD', 'sw.js');
http.onload = () => {
$wnd.Vaadin.connectionState.state = ConnectionState.CONNECTED;
};
Expand Down

0 comments on commit b346cf3

Please sign in to comment.