File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -348,7 +348,7 @@ export class NetlifyCacheHandler implements CacheHandlerForMultipleVersions {
348
348
if ( requestContext ?. didPagesRouterOnDemandRevalidate ) {
349
349
// encode here to deal with non ASCII characters in the key
350
350
const tag = `_N_T_${ key === '/index' ? '/' : encodeURI ( key ) } `
351
- const tags = tag . split ( / , | % 2 c / gi)
351
+ const tags = tag . split ( / , | % 2 c / gi) . filter ( Boolean )
352
352
353
353
if ( tags . length === 0 ) {
354
354
return
@@ -384,9 +384,9 @@ export class NetlifyCacheHandler implements CacheHandlerForMultipleVersions {
384
384
private async doRevalidateTag ( tagOrTags : string | string [ ] , ...args : any ) {
385
385
getLogger ( ) . withFields ( { tagOrTags, args } ) . debug ( 'NetlifyCacheHandler.revalidateTag' )
386
386
387
- const tags = ( Array . isArray ( tagOrTags ) ? tagOrTags : [ tagOrTags ] ) . flatMap ( ( tag ) =>
388
- tag . split ( / , | % 2 c / gi) ,
389
- )
387
+ const tags = ( Array . isArray ( tagOrTags ) ? tagOrTags : [ tagOrTags ] )
388
+ . flatMap ( ( tag ) => tag . split ( / , | % 2 c / gi) )
389
+ . filter ( Boolean )
390
390
391
391
if ( tags . length === 0 ) {
392
392
return
You can’t perform that action at this time.
0 commit comments