Skip to content

Commit 84a6c5d

Browse files
authored
Neaten extract.DEFAULT resolution (#5778)
1 parent 92df04d commit 84a6c5d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/util/normalizeConfig.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export function normalizeConfig(config) {
170170

171171
let extractors = {}
172172

173-
extractors.DEFAULT = (() => {
173+
let defaultExtractor = (() => {
174174
if (config.purge?.options?.defaultExtractor) {
175175
return config.purge.options.defaultExtractor
176176
}
@@ -182,6 +182,10 @@ export function normalizeConfig(config) {
182182
return undefined
183183
})()
184184

185+
if (defaultExtractor !== undefined) {
186+
extractors.DEFAULT = defaultExtractor
187+
}
188+
185189
// Functions
186190
if (typeof extract === 'function') {
187191
extractors.DEFAULT = extract

0 commit comments

Comments
 (0)