[ticket/17321] Fix eslint issues

PHPBB3-17321
This commit is contained in:
rxu 2024-05-27 14:40:29 +07:00
parent ad715dac08
commit 3973fbe649
No known key found for this signature in database
GPG key ID: 8117904FEDEFDD17

View file

@ -3,7 +3,7 @@
function webpushWorkerUpdate() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistration(serviceWorkerUrl)
.then((registration) => {
.then(registration => {
registration.update();
})
.catch(error => {
@ -12,6 +12,7 @@ function webpushWorkerUpdate() {
});
}
}
// Do not redeclare function if exist
if (typeof domReady === 'undefined') {
window.domReady = function(callBack) {
@ -20,9 +21,10 @@ if (typeof domReady === 'undefined') {
} else {
callBack();
}
}
};
}
/* global domReady */
domReady(() => {
/* global serviceWorkerUrl */
webpushWorkerUpdate();