From 2f34dffab406f776a5eff4501d8349a1edaaf108 Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Tue, 5 Nov 2019 20:37:44 -0800 Subject: [PATCH] fixed sw initialization error --- app/utils.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/utils.js b/app/utils.js index 65a17262..a71cd70f 100644 --- a/app/utils.js +++ b/app/utils.js @@ -1,5 +1,10 @@ /* global Android */ -const html = require('choo/html'); +let html; +try { + html = require('choo/html'); +} catch (e) { + // running in the service worker +} const b64 = require('base64-js'); function arrayToB64(array) {