Merge pull request #148 from shanebo/master

Added hasOwnProperty check in result object for in
This commit is contained in:
Faisal Salman 2015-11-02 09:39:34 +07:00
commit e944fededb

View File

@ -89,11 +89,13 @@
if (typeof result === UNDEF_TYPE) {
result = {};
for (p in props) {
q = props[p];
if (typeof q === OBJ_TYPE) {
result[q[0]] = undefined;
} else {
result[q] = undefined;
if (props.hasOwnProperty(p)){
q = props[p];
if (typeof q === OBJ_TYPE) {
result[q[0]] = undefined;
} else {
result[q] = undefined;
}
}
}
}