Skip to content

Commit 1e13731

Browse files
committed
Orphans: use Object.prototype.hasOwnProperty instead of in
1 parent 257673e commit 1e13731

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var groupByParents = function(array, options) {
3030

3131
return array.reduce(function(prev, item) {
3232
var parentID = property.get(item, options.parentProperty);
33-
if (!parentID || !(parentID in arrayByID)) {
33+
if (!parentID || !arrayByID.hasOwnProperty(parentID)) {
3434
parentID = options.rootID;
3535
}
3636

0 commit comments

Comments
 (0)