Skip to content

Commit

Permalink
fix(ssr): Check fresh HTML length before bumping perma cache file
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed May 18, 2024
1 parent d5f0029 commit 4040cce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/ssr/src/lib/util/bump-cdn-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export const bumpBunnyCache = async (pageViewDocs: PageViewDocs, domain: string)
purgeReqs.push(
// eslint-disable-next-line no-loop-func
axios.get(freshHtmlUrl).then(({ data: freshHtml }: { data: string }) => {
if (freshHtml.length < 100) return;
const paths = pathname.slice(1).split('/');
const filename = paths.pop() || '';
let folderpath = paths.join('/');
Expand Down

0 comments on commit 4040cce

Please sign in to comment.