Disable serviceworkers on Safari browsers (#12907)
* Disable servicework on Safari browsers * Update app/assets/javascripts/serviceworker-companion.js Co-authored-by: Jamie Gaskins <jgaskins@hey.com> Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
This commit is contained in:
parent
03b4f4a95a
commit
e83101e388
1 changed files with 5 additions and 1 deletions
|
|
@ -1,6 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
if (
|
||||
'serviceWorker' in navigator &&
|
||||
!('safari' in window)
|
||||
) {
|
||||
// Safari has issues with the service worker, so we'll just skip it on those browsers
|
||||
navigator.serviceWorker
|
||||
.register('/serviceworker.js', { scope: '/' })
|
||||
.then(function swStart(registration) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue