mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-28 08:28:47 +03:00
Merge pull request #148 from shanebo/master
Added hasOwnProperty check in result object for in
This commit is contained in:
commit
e944fededb
@ -89,6 +89,7 @@
|
|||||||
if (typeof result === UNDEF_TYPE) {
|
if (typeof result === UNDEF_TYPE) {
|
||||||
result = {};
|
result = {};
|
||||||
for (p in props) {
|
for (p in props) {
|
||||||
|
if (props.hasOwnProperty(p)){
|
||||||
q = props[p];
|
q = props[p];
|
||||||
if (typeof q === OBJ_TYPE) {
|
if (typeof q === OBJ_TYPE) {
|
||||||
result[q[0]] = undefined;
|
result[q[0]] = undefined;
|
||||||
@ -97,6 +98,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// try matching uastring with regexes
|
// try matching uastring with regexes
|
||||||
j = k = 0;
|
j = k = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user