From 30ff3601d27cac622eec7f1ef1b242296e903842 Mon Sep 17 00:00:00 2001 From: Marko Roeder Date: Fri, 19 Oct 2018 18:03:20 +0000 Subject: [PATCH] Fix IndexedDB use in (iFrames in) Safari browsers --- src/instrumentation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/instrumentation.js b/src/instrumentation.js index 29a5597..a8fbf36 100644 --- a/src/instrumentation.js +++ b/src/instrumentation.js @@ -471,9 +471,9 @@ async function customTranslate(proceed, load) { console.error(`[lively.modules customTranslate] failed storing module cache: ${e.stack}`); } } else if (useCache && indexdb && isEsm) { - var cache = System._livelyModulesTranslationCache - || (System._livelyModulesTranslationCache = new BrowserModuleTranslationCache()); try { + var cache = System._livelyModulesTranslationCache + || (System._livelyModulesTranslationCache = new BrowserModuleTranslationCache()); await cache.cacheModuleSource(load.name, hashForCache, translated) debug && console.log("[lively.modules customTranslate] stored cached version for %s", load.name); } catch (e) {