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 3727947 commit 76a3b57Copy full SHA for 76a3b57
packages/gatsby/src/redux/actions/public.js
@@ -1398,6 +1398,12 @@ actions.removePageData = (id: PageDataRemove) => {
1398
* @param {string} $0.id the chunkName for the page component.
1399
*/
1400
actions.createServerVisitedPage = (chunkName: string) => {
1401
+ if (store.getState().visitedPages.get(`server`)?.has(chunkName)) {
1402
+ // we already have given chunk tracked, let's not emit `CREATE_SERVER_VISITED_PAGE`
1403
+ // action to not cause any additional work
1404
+ return []
1405
+ }
1406
+
1407
return {
1408
type: `CREATE_SERVER_VISITED_PAGE`,
1409
payload: { componentChunkName: chunkName },
0 commit comments