1
0
Fork 0
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:
Arunoda Susiripala 2017-04-06 10:58:04 +05:30
parent 32cdf3f2d0
commit 65a2603917
3 changed files with 9 additions and 9 deletions

View file

@ -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')

View file

@ -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

View file

@ -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)
}
`)
}