Skip to content

Commit

Permalink
Fix regression with removing non-dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
tbranyen committed Dec 3, 2014
1 parent a7cacd8 commit 982b8b7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/shared/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ define(function(require, exports, module) {
// Create a new scoped data object.
dataObject = createObject(data);
dataObject[index] = key;
dataObject[value] = obj[key];

if (value) {
dataObject[value] = obj[key];
}
// If no value was supplied, use this object to key off of.
else {
dataObject = obj[key];
}

// Add return value of iterator function to output.
output.push(iterator(dataObject));
Expand Down

0 comments on commit 982b8b7

Please sign in to comment.