Why is emit undefined in unregister
kopax-polyconseil opened this issue · comments
Hi @yyx990803 and thanks for sharing. I am reading at your code and I try to understand why this is not defined
in the function scope :
register-service-worker/src/index.js
Line 127 in 756fe7f
Thanks in advance,
@yyx990803 please also add SW cache removal to unregister function
// Delete SW Cache
if ('caches' in window) {
caches.keys()
.then(function(keyList) {
return Promise.all(keyList.map(function(key) {
return caches.delete(key);
}));
})
}