Skip to content

Commit

Permalink
Filter null rules
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed Mar 26, 2021
1 parent 48bd970 commit b4c4e03
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,15 @@ const forms = plugin.withOptions(function (options = { strategy: 'base' }) {
]

addBase(
rules.map((rule) => {
if (rule[strategy] === null) {
return null
}
return { [rule[strategy]]: rule.styles }
})
rules
.map((rule) => {
if (rule[strategy] === null) {
return null
}

return { [rule[strategy]]: rule.styles }
})
.filter(Boolean)
)
}
})
Expand Down

1 comment on commit b4c4e03

@vercel
Copy link

@vercel vercel bot commented on b4c4e03 Mar 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.