Skip to content

Commit 9cd96bf

Browse files
author
edencoder
committed
only install if version does not match
1 parent d70ed8e commit 9cd96bf

File tree

1 file changed

+13
-0
lines changed
  • bundles/serviceworker/public/js/serviceworker

1 file changed

+13
-0
lines changed

bundles/serviceworker/public/js/serviceworker/offline.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class EdenOffline extends Events {
2626

2727
// Bind methods
2828
this.build = this.build.bind(this);
29+
this.version = null;
2930

3031
// Build this
3132
this.building = this.build();
@@ -158,6 +159,18 @@ class EdenOffline extends Events {
158159
// config
159160
const config = await this.eden.config(true);
160161

162+
// check version
163+
if (config.version === this.version) {
164+
// installing false
165+
this._installing = false;
166+
167+
// return
168+
return;
169+
}
170+
171+
// set version
172+
this.version = config.version;
173+
161174
// install offline cache
162175
this.eden.log('info', 'installing offline cache');
163176

0 commit comments

Comments
 (0)