mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 16:08: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,11 +89,13 @@
|
|||||||
if (typeof result === UNDEF_TYPE) {
|
if (typeof result === UNDEF_TYPE) {
|
||||||
result = {};
|
result = {};
|
||||||
for (p in props) {
|
for (p in props) {
|
||||||
q = props[p];
|
if (props.hasOwnProperty(p)){
|
||||||
if (typeof q === OBJ_TYPE) {
|
q = props[p];
|
||||||
result[q[0]] = undefined;
|
if (typeof q === OBJ_TYPE) {
|
||||||
} else {
|
result[q[0]] = undefined;
|
||||||
result[q] = undefined;
|
} else {
|
||||||
|
result[q] = undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user