From 714147b9802a0b0c6f0041b9299714f4a462ced5 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Thu, 5 Nov 2020 16:32:42 +1300 Subject: [PATCH] Fix lazy loading cache --- src/js/lazy-load-module.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/lazy-load-module.js b/src/js/lazy-load-module.js index 7296234..efe642d 100644 --- a/src/js/lazy-load-module.js +++ b/src/js/lazy-load-module.js @@ -1,6 +1,7 @@ // I hate this with passion async function lazyLoad(url) { - const cache = window.lazy_load_cache || new Map() + const cache = window.lazyLoadCache || new Map() + window.lazyLoadCache = cache if (cache.get(url)) return cache.get(url) const module = loadModuleWithoutCache(url)