Merge "Remove the localStorage replication of the block cookie"
[lhc/web/wiklou.git] / resources / src / jquery / jquery.color.js
index a3cc8fc..847afd4 100644 (file)
 ( function ( $ ) {
 
        function getColor( elem, attr ) {
-               /*jshint boss:true */
                var color;
 
                do {
                        color = $.css( elem, attr );
 
                        // Keep going until we find an element that has color, or we hit the body
-                       if ( color !== '' && color !== 'transparent' || $.nodeName( elem, 'body' ) ) {
+                       if ( color !== '' && color !== 'transparent' || elem.nodeName.toLowerCase() === 'body' ) {
                                break;
                        }
 
                        attr = 'backgroundColor';
+               // eslint-disable-next-line no-cond-assign
                } while ( elem = elem.parentNode );
 
                return $.colorUtil.getRGB( color );