Skip to content

Commit c4635d2

Browse files
committed
Minor doc changes and code fixes
1 parent ab959e8 commit c4635d2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

platform.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@
212212
* @private
213213
* @param {Array} array The array to iterate over.
214214
* @param {Function} callback The function called per iteration.
215-
* @param {*} accumulator Initial value of the accumulator.
216215
* @returns {*} The accumulator.
217216
*/
218217
function reduce(array, callback) {
@@ -412,8 +411,8 @@
412411
return result || (
413412
value[product] ||
414413
value[0/*Opera 9.25 fix*/, /^[a-z]+(?: +[a-z]+\b)*/i.exec(product)] ||
415-
RegExp('\\b' + (key.pattern || qualify(key)) + '(?:\\b|\\w*\\d)', 'i').exec(ua)
416-
) && (key.label || key);
414+
RegExp('\\b' + qualify(key) + '(?:\\b|\\w*\\d)', 'i').exec(ua)
415+
) && key;
417416
});
418417
}
419418

@@ -557,7 +556,7 @@
557556
product = (product ? product + ' ' : '') + 'Simulator';
558557
}
559558
// detect Firefox OS
560-
if ((/\(Mobile|Tablet.*Firefox/i).test(ua)) {
559+
if ((/\((?:Mobile|Tablet).*?Firefox/i).test(ua)) {
561560
os = 'Firefox OS';
562561
}
563562
// detect iOS

0 commit comments

Comments
 (0)