FIX: isSafari detection wasn't working with latest Safari

This commit is contained in:
Régis Hanol 2016-12-05 11:32:38 +01:00
parent cdb7e14fa7
commit edce052660
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ export default {
caps.isOpera = !!window.opera || ua.indexOf(' OPR/') >= 0;
caps.isFirefox = typeof InstallTrigger !== 'undefined';
caps.isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
caps.isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0 || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || safari.pushNotification);
caps.isChrome = !!window.chrome && !caps.isOpera;
caps.canPasteImages = caps.isChrome || caps.isFirefox;
}