diff --git a/src/services/browserPlatformUtils.service.spec.ts b/src/services/browserPlatformUtils.service.spec.ts index f2fa484a02..8a33f811d0 100644 --- a/src/services/browserPlatformUtils.service.spec.ts +++ b/src/services/browserPlatformUtils.service.spec.ts @@ -79,6 +79,11 @@ describe('Browser Utils Service', () => { const browserPlatformUtilsService = new BrowserPlatformUtilsService(null, null); expect(browserPlatformUtilsService.getDevice()).toBe(DeviceType.SafariExtension); + + Object.defineProperty(window, 'safariAppExtension', { + configurable: true, + value: false, + }); }); it('should detect vivaldi', () => { diff --git a/src/services/browserPlatformUtils.service.ts b/src/services/browserPlatformUtils.service.ts index 9da0fa529f..8d8dfb4535 100644 --- a/src/services/browserPlatformUtils.service.ts +++ b/src/services/browserPlatformUtils.service.ts @@ -24,7 +24,7 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService return this.deviceCache; } - if (BrowserApi.isSafariApi) { + if ((window as any).safariAppExtension === true) { this.deviceCache = DeviceType.SafariExtension; } else if (navigator.userAgent.indexOf(' Firefox/') !== -1 || navigator.userAgent.indexOf(' Gecko/') !== -1) { this.deviceCache = DeviceType.FirefoxExtension;