File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,17 +188,22 @@ const APP_LOADING_HTML = `
188188
189189 setInterval(function() {
190190 try {
191+ var url = window.location.pathname + '?' + Math.random();
191192 var xhr = new XMLHttpRequest();
192193 xhr.addEventListener('load', function() {
193194 try {
194- if (this.responseText.indexOf('app-dev-first-build-loader') === -1) {
195- window.location.reload(true);
195+ if (this.status < 300) {
196+ if (this.responseText.indexOf('app-dev-first-build-loader') === -1) {
197+ window.location.reload(true);
198+ }
199+ } else if (window.location.pathname !== '/') {
200+ url = '/' + Math.random();
196201 }
202+
197203 } catch (e) {
198204 console.error(e);
199205 }
200206 });
201- var url = window.location.pathname + '?' + Math.random();
202207 xhr.open('GET', url);
203208 xhr.send();
204209 } catch (e) {
You can’t perform that action at this time.
0 commit comments