Disable service worker on Apple devices for now.
The service worker is not used for any features on Apple devices and we've received multiple reports of service workers causing problems.
This commit is contained in:
parent
0ab42e9185
commit
6d0732f7b4
@ -7,10 +7,11 @@ export default {
|
||||
location.hostname === "localhost";
|
||||
|
||||
const isSupported = isSecured && "serviceWorker" in navigator;
|
||||
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
||||
|
||||
if (isSupported) {
|
||||
if (Discourse.ServiceWorkerURL && !isSafari) {
|
||||
const isApple = !!navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i);
|
||||
|
||||
if (Discourse.ServiceWorkerURL && !isApple) {
|
||||
navigator.serviceWorker.getRegistrations().then(registrations => {
|
||||
for (let registration of registrations) {
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user