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 {
}
if (!this.loadingRoutes[route]) {
this.loadingRoutes[route] = true
if (process.env.__NEXT_GRANULAR_CHUNKS) {
this.getDependencies(route).then(deps => {
deps.forEach(d => {
......@@ -130,11 +131,9 @@ export default class PageLoader {
}
})
this.loadRoute(route)
this.loadingRoutes[route] = true
})
} else {
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