Use IE11-compatible code for worker deregistration. (#5079)

Fixes #5078.
This commit is contained in:
Ben Thomson 2020-05-19 18:59:03 +08:00 committed by GitHub
parent a5ccfb2f99
commit cf12edb861
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -59,10 +59,10 @@
if (location.protocol === 'https:') {
// Unregister all service workers before signing in to prevent cache issues, see github issue: #3707
navigator.serviceWorker.getRegistrations().then(
function(registrations) {
for (let registration of registrations) {
function (registrations) {
registrations.forEach(function (registration) {
registration.unregister();
}
});
}
);
}

View File

@ -46,10 +46,10 @@
if (location.protocol === 'https:') {
// Unregister all service workers before signing in to prevent cache issues, see github issue: #3707
navigator.serviceWorker.getRegistrations().then(
function(registrations) {
for (let registration of registrations) {
function (registrations) {
registrations.forEach(function (registration) {
registration.unregister();
}
});
}
);
}