Commit 4f0c74c5 authored by Joe Haddad's avatar Joe Haddad Committed by JJ Kasper

Fix Potential Duplication of Page Loading (#9894)

parent 5be30aae
...@@ -110,6 +110,7 @@ export default class PageLoader { ...@@ -110,6 +110,7 @@ export default class PageLoader {
} }
if (!this.loadingRoutes[route]) { if (!this.loadingRoutes[route]) {
this.loadingRoutes[route] = true
if (process.env.__NEXT_GRANULAR_CHUNKS) { if (process.env.__NEXT_GRANULAR_CHUNKS) {
this.getDependencies(route).then(deps => { this.getDependencies(route).then(deps => {
deps.forEach(d => { deps.forEach(d => {
...@@ -130,11 +131,9 @@ export default class PageLoader { ...@@ -130,11 +131,9 @@ export default class PageLoader {
} }
}) })
this.loadRoute(route) this.loadRoute(route)
this.loadingRoutes[route] = true
}) })
} else { } else {
this.loadRoute(route) this.loadRoute(route)
this.loadingRoutes[route] = true
} }
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment