Fix lazy loading cache
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
Cadence Ember 2020-11-05 16:32:42 +13:00
parent 1bf1712684
commit 714147b980
Signed by: cadence
GPG key ID: BC1C2C61CF521B17

View file

@ -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)