mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Rename NEXT_LOADED_PAGES into __NEXT_LOADED_PAGES__
This commit is contained in:
parent
32cdf3f2d0
commit
65a2603917
|
@ -29,9 +29,9 @@ const {
|
|||
} = window
|
||||
|
||||
const pageLoader = window.__NEXT_PAGE_LOADER__ = new PageLoader(buildId)
|
||||
if (window.NEXT_LOADED_PAGES) {
|
||||
window.NEXT_LOADED_PAGES.forEach((fn) => fn())
|
||||
delete window.NEXT_LOADED_PAGES
|
||||
if (window.__NEXT_LOADED_PAGES__) {
|
||||
window.__NEXT_LOADED_PAGES__.forEach((fn) => fn())
|
||||
delete window.__NEXT_LOADED_PAGES__
|
||||
}
|
||||
|
||||
const ErrorComponent = pageLoader.loadPageSync('/_error')
|
||||
|
|
|
@ -24,8 +24,8 @@ export default class PagesPlugin {
|
|||
if (window.__NEXT_PAGE_LOADER__) {
|
||||
loadPage()
|
||||
} else {
|
||||
window.NEXT_LOADED_PAGES = window.NEXT_LOADED_PAGES || []
|
||||
window.NEXT_LOADED_PAGES.push(loadPage)
|
||||
window.__NEXT_LOADED_PAGES__ = window.__NEXT_LOADED_PAGES__ || []
|
||||
window.__NEXT_LOADED_PAGES__.push(loadPage)
|
||||
}
|
||||
`
|
||||
// Replace the exisiting chunk with the new content
|
||||
|
|
|
@ -141,8 +141,8 @@ export async function renderScriptError (req, res, page, error, customFields, op
|
|||
if (window.__NEXT_PAGE_LOADER__) {
|
||||
loadPage()
|
||||
} else {
|
||||
window.NEXT_LOADED_PAGES = window.NEXT_LOADED_PAGES || []
|
||||
window.NEXT_LOADED_PAGES.push(loadPage)
|
||||
window.__NEXT_LOADED_PAGES__ = window.__NEXT_LOADED_PAGES__ || []
|
||||
window.__NEXT_LOADED_PAGES__.push(loadPage)
|
||||
}
|
||||
`)
|
||||
return
|
||||
|
@ -163,8 +163,8 @@ export async function renderScriptError (req, res, page, error, customFields, op
|
|||
if (window.__NEXT_PAGE_LOADER__) {
|
||||
loadPage()
|
||||
} else {
|
||||
window.NEXT_LOADED_PAGES = window.NEXT_LOADED_PAGES || []
|
||||
window.NEXT_LOADED_PAGES.push(loadPage)
|
||||
window.__NEXT_LOADED_PAGES__ = window.__NEXT_LOADED_PAGES__ || []
|
||||
window.__NEXT_LOADED_PAGES__.push(loadPage)
|
||||
}
|
||||
`)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue