Fix lazy loading cache
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details

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
1 changed files with 2 additions and 1 deletions

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)