Skip to content

Commit

Permalink
fix: do not register SW for Safari until upstream fixes #9193
Browse files Browse the repository at this point in the history
  • Loading branch information
gasoved authored and psychobunny committed May 3, 2021
1 parent cb1dd0a commit ce5fea2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion public/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,8 @@ app.cacheBuster = null;
};

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 + '/' })
.then(function () {
console.info('ServiceWorker registration succeeded.');
Expand Down

0 comments on commit ce5fea2

Please sign in to comment.