@@ -446,24 +446,24 @@ class Purgecss {
446446 getWhitelistedSelector ( selector : string ) : Object {
447447 if ( this . options . whitelist ) {
448448 for ( const item of this . options . whitelist ) {
449- const isString = typeof item === 'string'
450- const pattern = isString ? item : item . pattern
449+ const isString = ( typeof item === 'string' )
450+ const pattern = ( isString ) ? item : item . pattern
451451
452452 // Assert the pattern match the given selector
453453 if ( pattern === selector ) {
454- return isString ? { pattern : pattern } : item
454+ return ( isString ) ? { pattern : pattern } : item
455455 }
456456 }
457457 }
458458
459459 if ( this . options . whitelistPatterns ) {
460460 for ( const item of this . options . whitelistPatterns ) {
461- const isRegExp = item instanceof RegExp
462- const pattern = isRegExp ? item : item . pattern
461+ const isRegExp = ( item instanceof RegExp )
462+ const pattern = ( isRegExp ) ? item : item . pattern
463463
464464 // Assert the pattern match the given selector
465465 if ( pattern . test ( selector ) ) {
466- return isRegExp ? { pattern : pattern } : item
466+ return ( isRegExp ) ? { pattern : pattern } : item
467467 }
468468 }
469469 }
@@ -478,7 +478,7 @@ class Purgecss {
478478 */
479479 hasSelectorKeepChildren ( selector : string ) : Object {
480480 const whitelist = this . getWhitelistedSelector ( selector )
481- return whitelist . hasOwnProperty ( 'keepChildren' ) ? whitelist . keepChildren : false
481+ return ( whitelist . hasOwnProperty ( 'keepChildren' ) ) ? whitelist . keepChildren : false
482482 }
483483}
484484
0 commit comments