diff --git a/src/selection/join.js b/src/selection/join.js index f2c508d..67d3a96 100644 --- a/src/selection/join.js +++ b/src/selection/join.js @@ -6,7 +6,10 @@ function(onenter, onupdate, onexit) { } else { enter = enter.append(onenter + ""); } - if (onupdate != null) update = onupdate(update); + if (onupdate != null) { + update = onupdate(update); + if (update) update = update.selection(); + } if (onexit == null) exit.remove(); else onexit(exit); return enter && update ? enter.merge(update).order() : update; }