mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
Merge pull request #17355 from ionic-team/update-pwa-check
fix(platform): add additional check for safari PWA
This commit is contained in:
@ -109,7 +109,7 @@ function isElectron(win: Window): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isPWA(win: Window): boolean {
|
function isPWA(win: Window): boolean {
|
||||||
return win.matchMedia('(display-mode: standalone)').matches;
|
return win.matchMedia('(display-mode: standalone)').matches || (win.navigator as any).standalone;
|
||||||
}
|
}
|
||||||
|
|
||||||
function testUserAgent(win: Window, expr: RegExp) {
|
function testUserAgent(win: Window, expr: RegExp) {
|
||||||
|
Reference in New Issue
Block a user