Skip to content

Commit c593abe

Browse files
committed
Rebind returns target when the source returns itself (i.e. chain rebound)
1 parent 35ac9dd commit c593abe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/core/rebind.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ d3.rebind = function(target, source) {
1111
function d3_rebind(target, source, method) {
1212
return function() {
1313
var value = method.apply(source, arguments);
14-
return arguments.length ? target : value;
14+
return arguments.length || value === source ? target : value;
1515
};
1616
}

0 commit comments

Comments
 (0)