We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fb66fb commit e8e1d60Copy full SHA for e8e1d60
packages/open-next/src/overrides/tagCache/fs-dev.ts
@@ -33,13 +33,11 @@ const tagCache: TagCache = {
33
return revalidatedTags.length > 0 ? -1 : (lastModified ?? Date.now());
34
},
35
writeTags: async (newTags) => {
36
+ const newTagsSet = new Set(
37
+ newTags.map(({ tag, path }) => `${tag}-${path}`),
38
+ );
39
const unchangedTags = tags.filter(
- (tagPathMapping) =>
- !newTags.some(
- (tag) =>
40
- tag.tag === tagPathMapping.tag.S &&
41
- tag.path === tagPathMapping.path.S,
42
- ),
+ ({ tag, path }) => !newTagsSet.has(`${tag.S}-${path.S}`),
43
);
44
tags = unchangedTags.concat(
45
newTags.map((tag) => ({
0 commit comments