FIX: Service worker for Safari (#21435)
The first rule in the service worker is bypassed for Safari, but the previous detection method was matching any browser running on macOS.
This commit is contained in:
parent
e8aea3c558
commit
9ae5ddb330
|
@ -19,7 +19,7 @@ var externalCacheName = "external-" + cacheVersion;
|
|||
// https://bugs.chromium.org/p/chromium/issues/detail?id=1286367
|
||||
var chromeVersionMatch = navigator.userAgent.match(/Chrome\/97.0.(\d+)/);
|
||||
var isBrokenChrome97 = chromeVersionMatch && parseInt(chromeVersionMatch[1]) <= 4692;
|
||||
var isApple = /iPhone|iPod|Mac OS/.test(navigator.userAgent);
|
||||
var isApple = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
||||
|
||||
// Cache all GET requests, so Discourse can be used while offline
|
||||
workbox.routing.registerRoute(
|
||||
|
|
Loading…
Reference in New Issue