@resolveio/client-lib-core 1.1.14 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5055,6 +5055,20 @@ class CoreComponent extends BaseComponent {
5055
5055
  if (flag) {
5056
5056
  this.swFlagAlert = this._services._alert.setAlert('info', 'This page will reload once new version has been downloaded', 0);
5057
5057
  this._services._app.setIsInvalidSW(true);
5058
+ if (!navigator.serviceWorker) {
5059
+ setTimeout(() => {
5060
+ window.location.reload();
5061
+ }, 10000);
5062
+ }
5063
+ else {
5064
+ navigator.serviceWorker.getRegistrations().then(registrations => {
5065
+ if (!registrations || !registrations.length) {
5066
+ setTimeout(() => {
5067
+ window.location.reload();
5068
+ }, 10000);
5069
+ }
5070
+ });
5071
+ }
5058
5072
  }
5059
5073
  else if (this.swFlagAlert) {
5060
5074
  this._services._app.setIsInvalidSW(false);