Skip to content

Commit bac33ab

Browse files
committed
more strict check for double negative numbers
1 parent ae02676 commit bac33ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/image/strict-d3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function checkAttrVal(sel, key, val) {
5555

5656
// make sure no double-negative string get into the DOM,
5757
// their handling differs from browsers to browsers
58-
if(/--/.test(val)) {
58+
if(/--/.test(val) && isNumeric(val.split('--')[1].charAt(0))) {
5959
throw new Error('d3 selection.attr called with value ' + val + ' which includes a double negative');
6060
}
6161
}

0 commit comments

Comments
 (0)