Skip to content

Commit

Permalink
Merge branch 'fix-classed-remove' of git://github.com/jasondavies/d3 …
Browse files Browse the repository at this point in the history
…into 2.9.7
  • Loading branch information
mbostock committed Jul 31, 2012
2 parents 151d5fe + fe80362 commit e74a925
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions d3.v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1670,9 +1670,11 @@ function d3_selection_classed(name, value) {
var c = this.className,
cb = c.baseVal != null,
cv = cb ? c.baseVal : c;
cv = d3_collapse(cv.replace(re, " "));
if (cb) c.baseVal = cv;
else this.className = cv;
if (cv) {
cv = d3_collapse(cv.replace(re, " "));
if (cb) c.baseVal = cv;
else this.className = cv;
}
}

function classedFunction() {
Expand Down
Loading

0 comments on commit e74a925

Please sign in to comment.