File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -157,9 +157,12 @@ const plugin = (options = {}) => {
157
157
media = valueParser . stringify ( mediaNodes ) . trim ( ) . toLowerCase ( ) ;
158
158
}
159
159
160
- if ( options . filter && ! options . filter ( normalizedUrl , media ) ) {
161
- // eslint-disable-next-line no-continue
162
- continue ;
160
+ if ( options . filter ) {
161
+ const processURL = await options . filter ( normalizedUrl , media ) ;
162
+ if ( ! processURL ) {
163
+ // eslint-disable-next-line no-continue
164
+ continue ;
165
+ }
163
166
}
164
167
165
168
node . remove ( ) ;
Original file line number Diff line number Diff line change @@ -261,7 +261,8 @@ const plugin = (options = {}) => {
261
261
262
262
normalizedUrl = normalizeUrl ( normalizedUrl , isStringValue ) ;
263
263
264
- if ( ! options . filter ( normalizedUrl ) ) {
264
+ const processUrl = await options . filter ( normalizedUrl ) ;
265
+ if ( ! processUrl ) {
265
266
// eslint-disable-next-line no-continue
266
267
continue ;
267
268
}
You can’t perform that action at this time.
0 commit comments