Skip to content

Commit cb19ba4

Browse files
committed
Added iOS safari 10 match
1 parent 8972026 commit cb19ba4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/core/fontwatcher.js

100644100755
+5-2
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,14 @@ goog.scope(function () {
5757
if (FontWatcher.SHOULD_USE_NATIVE_LOADER === null) {
5858
if (!!window.FontFace) {
5959
var match = /Gecko.*Firefox\/(\d+)/.exec(FontWatcher.getUserAgent());
60-
var safari10Match = /OS X.*Version\/10\..*Safari/.exec(FontWatcher.getUserAgent()) && /Apple/.exec(FontWatcher.getVendor());
60+
var appleMatch = /Apple/.exec(FontWatcher.getVendor())
61+
var safari10Match = /OS X.*Version\/10\..*Safari/.exec(FontWatcher.getUserAgent()) ||
62+
/AppleWebKit\/603/.exec(FontWatcher.getUserAgent()) ||
63+
/AppleWebKit\/602/.exec(FontWatcher.getUserAgent())
6164

6265
if (match) {
6366
FontWatcher.SHOULD_USE_NATIVE_LOADER = parseInt(match[1], 10) > 42;
64-
} else if (safari10Match) {
67+
} else if (appleMatch && safari10Match) {
6568
FontWatcher.SHOULD_USE_NATIVE_LOADER = false;
6669
} else {
6770
FontWatcher.SHOULD_USE_NATIVE_LOADER = true;

0 commit comments

Comments
 (0)