From b346cf354af97c75e30648bb9eee84f1fd9330e5 Mon Sep 17 00:00:00 2001 From: Artur Date: Fri, 26 Mar 2021 22:01:31 +0200 Subject: [PATCH] fix: simplifiy sw.js polling (#10436) --- .../src/main/resources/META-INF/resources/frontend/Flow.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flow-client/src/main/resources/META-INF/resources/frontend/Flow.ts b/flow-client/src/main/resources/META-INF/resources/frontend/Flow.ts index d0118d7bb91..cd6e7534dba 100644 --- a/flow-client/src/main/resources/META-INF/resources/frontend/Flow.ts +++ b/flow-client/src/main/resources/META-INF/resources/frontend/Flow.ts @@ -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; };