Invert conditional to guard clause
This commit is contained in:
parent
8171ca79ff
commit
e603a22f5e
1 changed files with 5 additions and 5 deletions
|
|
@ -4,12 +4,12 @@ import postcss from 'postcss'
|
|||
export default function() {
|
||||
return function(css) {
|
||||
css.walkAtRules('tailwind', atRule => {
|
||||
if (atRule.params === 'preflight') {
|
||||
atRule.before(
|
||||
postcss.parse(fs.readFileSync(`${__dirname}/../../css/preflight.css`, 'utf8'))
|
||||
)
|
||||
atRule.remove()
|
||||
if (atRule.params !== 'preflight') {
|
||||
return
|
||||
}
|
||||
|
||||
atRule.before(postcss.parse(fs.readFileSync(`${__dirname}/../../css/preflight.css`, 'utf8')))
|
||||
atRule.remove()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue