File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,18 @@ selProto.style = function() {
46
46
return originalSelStyle . apply ( sel , arguments ) ;
47
47
} ;
48
48
49
- function checkAttrVal ( sel , key ) {
49
+ function checkAttrVal ( sel , key , val ) {
50
50
// setting the transform attribute on a <clipPath> does not
51
51
// work in Chrome, IE and Edge
52
52
if ( sel . node ( ) . nodeName === 'clipPath' && key === 'transform' ) {
53
53
throw new Error ( 'd3 selection.attr called with key \'transform\' on a clipPath node' ) ;
54
54
}
55
+
56
+ // make sure no double-negative string get into the DOM,
57
+ // their handling differs from browsers to browsers
58
+ if ( / - - / . test ( val ) ) {
59
+ throw new Error ( 'd3 selection.attr called with value ' + val + ' which includes a double negative' ) ;
60
+ }
55
61
}
56
62
57
63
function checkStyleVal ( sel , key , val ) {
You can’t perform that action at this time.
0 commit comments