File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 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 {
348348 if ( requestContext ?. didPagesRouterOnDemandRevalidate ) {
349349 // encode here to deal with non ASCII characters in the key
350350 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 )
352352
353353 if ( tags . length === 0 ) {
354354 return
@@ -384,9 +384,9 @@ export class NetlifyCacheHandler implements CacheHandlerForMultipleVersions {
384384 private async doRevalidateTag ( tagOrTags : string | string [ ] , ...args : any ) {
385385 getLogger ( ) . withFields ( { tagOrTags, args } ) . debug ( 'NetlifyCacheHandler.revalidateTag' )
386386
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 )
390390
391391 if ( tags . length === 0 ) {
392392 return
You can’t perform that action at this time.
0 commit comments