Fix Bug 1020764 - Users on OS X Yosemite see a system requirements error

I haven’t tested it yet but… `10.10` shouldn’t match here.
This commit is contained in:
Kohei Yoshino 2014-06-05 01:32:07 -04:00
Родитель 0501557ac5
Коммит f0c25307a4
2 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -56,7 +56,7 @@
if (pf.indexOf("MacPPC") !== -1) {
return 'oldmac';
}
if (/Mac OS X 10.[0-5]/.test(ua)) {
if (/Mac OS X 10.[0-5]\D/.test(ua)) {
return 'oldmac';
}
if (pf.indexOf('iPhone') !== -1 ||

Просмотреть файл

@ -40,6 +40,7 @@ describe("site.js", function () {
it("should identify OSX", function () {
expect(window.site.getPlatform('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:30.0) Gecko/20100101 Firefox/30.0', 'foo')).toBe('osx');
expect(window.site.getPlatform('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/538.10.3 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1', 'foo')).toBe('osx');
});
it("should identify Firefox OS", function () {