mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-17 23:37:43 +03:00
Make sure all properties are "undefined" for is("undefined") to be true
This commit is contained in:
@@ -787,12 +787,17 @@
|
||||
this.rgxIs = propIs[1];
|
||||
}
|
||||
UAItem.prototype.is = function (strCheck) {
|
||||
var is = false;
|
||||
for (var i in this.propIs) {
|
||||
if (sanitize(this[this.propIs[i]], this.rgxIs) == sanitize(strCheck, this.rgxIs)) {
|
||||
return true;
|
||||
is = true;
|
||||
if (strCheck != UNDEF_TYPE) break;
|
||||
} else if (strCheck == UNDEF_TYPE && is) {
|
||||
is = !is;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return is;
|
||||
};
|
||||
UAItem.prototype.toString = function () {
|
||||
var str = '';
|
||||
|
||||
Reference in New Issue
Block a user