diff options
Diffstat (limited to 'platform/web/js/engine/engine.js')
-rw-r--r-- | platform/web/js/engine/engine.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/web/js/engine/engine.js b/platform/web/js/engine/engine.js index 04c4c44c5e..1aeeb62f18 100644 --- a/platform/web/js/engine/engine.js +++ b/platform/web/js/engine/engine.js @@ -241,7 +241,11 @@ const Engine = (function () { */ installServiceWorker: function () { if (this.config.serviceWorker && 'serviceWorker' in navigator) { - return navigator.serviceWorker.register(this.config.serviceWorker); + try { + return navigator.serviceWorker.register(this.config.serviceWorker); + } catch (e) { + return Promise.reject(e); + } } return Promise.resolve(); }, |