mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: do not register SW for Safari until upstream fixes #9193
This commit is contained in:
committed by
Andrew Rodrigues
parent
cb1dd0a3db
commit
ce5fea2abd
@@ -799,7 +799,8 @@ app.cacheBuster = null;
|
|||||||
};
|
};
|
||||||
|
|
||||||
function registerServiceWorker() {
|
function registerServiceWorker() {
|
||||||
if ('serviceWorker' in navigator) {
|
// Do not register for Safari browsers
|
||||||
|
if (!ajaxify.data._locals.useragent.isSafari && 'serviceWorker' in navigator) {
|
||||||
navigator.serviceWorker.register(config.relative_path + '/service-worker.js', { scope: config.relative_path + '/' })
|
navigator.serviceWorker.register(config.relative_path + '/service-worker.js', { scope: config.relative_path + '/' })
|
||||||
.then(function () {
|
.then(function () {
|
||||||
console.info('ServiceWorker registration succeeded.');
|
console.info('ServiceWorker registration succeeded.');
|
||||||
|
|||||||
Reference in New Issue
Block a user