mbostock/d3 — pull request #719 by jasondavies (2012-07-23 15:18:38+00:00)
Title: Minor optimisation and Chrome bug workaround.

There appears to be a [bug in Chrome](https://code.google.com/p/chromium/issues/detail?id=138552) causing the whole tab to crash when setting the following for a newly-created element without a non-empty class name.

```js
svgNode.className.baseVal = "";
```

This fix is a minor optimisation: if the current class is empty then removing a class should be a no-op. It also conveniently works around the Chrome bug.