From 5277617ba634976c37d698641ddbfcd0b381d117 Mon Sep 17 00:00:00 2001 From: John Stark Date: Fri, 20 Mar 2015 12:51:06 -0600 Subject: [PATCH] Update attr.js Prevents error that is thrown when a resize event happens. --- src/selection/attr.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/selection/attr.js b/src/selection/attr.js index 723199a4c89788..a27673a8e1d2ee 100644 --- a/src/selection/attr.js +++ b/src/selection/attr.js @@ -36,7 +36,8 @@ function d3_selection_attr(name, value) { // For attr(string, string), set the attribute with the specified name. function attrConstant() { - this.setAttribute(name, value); + if(value && (String(value).indexOf("NaN") === -1)) + this.setAttribute(name, value); } function attrConstantNS() { this.setAttributeNS(name.space, name.local, value);