Update ua-parser.js

Prevents errors (cannot call .toLowerCase() on function) when Objects are extended downstream.
This commit is contained in:
Benjamin Bertrand 2014-05-05 17:55:33 -06:00 committed by Benxamin
parent 7234216e02
commit a23ae902b8

View File

@ -38,7 +38,9 @@
var util = { var util = {
has : function (str1, str2) { has : function (str1, str2) {
if (typeof str1 === "string") {
return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1; return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1;
}
}, },
lowerize : function (str) { lowerize : function (str) {
return str.toLowerCase(); return str.toLowerCase();