Skip to content

Commit b4c4e03

Browse files
committed
Filter null rules
1 parent 48bd970 commit b4c4e03

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Diff for: src/index.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,15 @@ const forms = plugin.withOptions(function (options = { strategy: 'base' }) {
250250
]
251251

252252
addBase(
253-
rules.map((rule) => {
254-
if (rule[strategy] === null) {
255-
return null
256-
}
257-
return { [rule[strategy]]: rule.styles }
258-
})
253+
rules
254+
.map((rule) => {
255+
if (rule[strategy] === null) {
256+
return null
257+
}
258+
259+
return { [rule[strategy]]: rule.styles }
260+
})
261+
.filter(Boolean)
259262
)
260263
}
261264
})

0 commit comments

Comments
 (0)