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() {
4646 return originalSelStyle . apply ( sel , arguments ) ;
4747} ;
4848
49- function checkAttrVal ( sel , key ) {
49+ function checkAttrVal ( sel , key , val ) {
5050 // setting the transform attribute on a <clipPath> does not
5151 // work in Chrome, IE and Edge
5252 if ( sel . node ( ) . nodeName === 'clipPath' && key === 'transform' ) {
5353 throw new Error ( 'd3 selection.attr called with key \'transform\' on a clipPath node' ) ;
5454 }
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+ }
5561}
5662
5763function checkStyleVal ( sel , key , val ) {
You can’t perform that action at this time.
0 commit comments