X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=resources%2Fsrc%2Fjquery%2Fjquery.colorUtil.js;h=a5b136d9691834413309beafd0067b9848552cd6;hp=c53ec3b147caad9cbb5ac4a646bf2e84d43411b1;hb=d19826aa35b206847a568a4b2c1c9ffaa615fca5;hpb=4cb9c1a24bde6e29c5e8f05c7cd1de54ffdd342a diff --git a/resources/src/jquery/jquery.colorUtil.js b/resources/src/jquery/jquery.colorUtil.js index c53ec3b147..a5b136d969 100644 --- a/resources/src/jquery/jquery.colorUtil.js +++ b/resources/src/jquery/jquery.colorUtil.js @@ -26,7 +26,7 @@ var result; // Check if we're already dealing with an array of colors - if ( color && $.isArray( color ) && color.length === 3 ) { + if ( color && Array.isArray( color ) && color.length === 3 ) { return color; } @@ -42,7 +42,7 @@ // Look for rgb(num%,num%,num%) // eslint-disable-next-line no-cond-assign - if ( result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec( color ) ) { + if ( result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)%\s*,\s*([0-9]+(?:\.[0-9]+)?)%\s*,\s*([0-9]+(?:\.[0-9]+)?)%\s*\)/.exec( color ) ) { return [ parseFloat( result[ 1 ] ) * 2.55, parseFloat( result[ 2 ] ) * 2.55,