FIX: Prevent undefined on isSafari capabilities test (#21914)
Added a null coalesce operator on the field `isSafari` on the capabilities service to prevent an error in case `pushNotifications` is `undefined`
This commit is contained in:
parent
0615f5cc95
commit
58c3bbc080
|
@ -29,7 +29,7 @@ export default class Capabilities extends Service {
|
|||
this.isChrome = !!window.chrome && !this.isOpera;
|
||||
this.isSafari =
|
||||
/Constructor/.test(window.HTMLElement) ||
|
||||
window.safari?.pushNotification.toString() ===
|
||||
window.safari?.pushNotification?.toString() ===
|
||||
"[object SafariRemoteNotification]";
|
||||
|
||||
this.hasContactPicker =
|
||||
|
|
Loading…
Reference in New Issue