Skip to content

Commit 35579bc

Browse files
committed
Fix a regression from 3cd0487 (close #2777)
1 parent a831bfe commit 35579bc

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

modules/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,7 @@ export var bindAll = restArguments(function(obj, _keys) {
805805
var key = _keys[index];
806806
obj[key] = bind(obj[key], obj);
807807
}
808+
return obj;
808809
});
809810

810811
// Memoize an expensive function by storing its results.

test/functions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@
9999
sayHi: function() { return 'hi: ' + this.name; }
100100
};
101101
curly.getName = moe.getName;
102-
_.bindAll(moe, 'getName', 'sayHi');
102+
var bound = _.bindAll(moe, 'getName', 'sayHi');
103+
assert.strictEqual(bound, moe, 'returns the bound object');
103104
curly.sayHi = moe.sayHi;
104105
assert.strictEqual(curly.getName(), 'name: curly', 'unbound function is bound to current object');
105106
assert.strictEqual(curly.sayHi(), 'hi: moe', 'bound function is still bound to original object');

underscore.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

underscore.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)