Skip to content

Commit

Permalink
Greedy coercion.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Oct 3, 2017
1 parent d80a8c8 commit fa12f44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drag.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default function() {
};

drag.touchable = function(_) {
return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(_), drag) : touchable;
return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), drag) : touchable;
};

drag.on = function() {
Expand Down

0 comments on commit fa12f44

Please sign in to comment.