From 65a260391795a3f3d2eb87d8795e4c39e67cd202 Mon Sep 17 00:00:00 2001 From: Arunoda Susiripala Date: Thu, 6 Apr 2017 10:58:04 +0530 Subject: [PATCH] Rename NEXT_LOADED_PAGES into __NEXT_LOADED_PAGES__ --- client/index.js | 6 +++--- server/build/plugins/pages-plugin.js | 4 ++-- server/render.js | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/client/index.js b/client/index.js index c741b3ca..5391ff0c 100644 --- a/client/index.js +++ b/client/index.js @@ -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') diff --git a/server/build/plugins/pages-plugin.js b/server/build/plugins/pages-plugin.js index 0bb9f49a..21791e63 100644 --- a/server/build/plugins/pages-plugin.js +++ b/server/build/plugins/pages-plugin.js @@ -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 diff --git a/server/render.js b/server/render.js index 6c692be3..28ee9dd6 100644 --- a/server/render.js +++ b/server/render.js @@ -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) } `) }