Invert conditional to guard clause

This commit is contained in:
Adam Wathan 2017-11-23 15:36:01 -05:00
parent 8171ca79ff
commit e603a22f5e

View file

@ -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()
})
}
}