From 7377bb3736ff933c3d0d327a0e0385925c5fd20f Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 27 Apr 2020 15:53:47 -0700 Subject: [PATCH] fix: do not add 104 to the history length (#23301) --- lib/renderer/window-setup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/renderer/window-setup.ts b/lib/renderer/window-setup.ts index 146f07f5ec..1029a78271 100644 --- a/lib/renderer/window-setup.ts +++ b/lib/renderer/window-setup.ts @@ -313,7 +313,7 @@ export const windowSetup = ( }; if (contextIsolationEnabled) internalContextBridge.overrideGlobalValueFromIsolatedWorld(['history', 'go'], window.history.go); - const getHistoryLength = () => ipcRendererInternal.sendSync('ELECTRON_NAVIGATION_CONTROLLER_LENGTH') + 104; + const getHistoryLength = () => ipcRendererInternal.sendSync('ELECTRON_NAVIGATION_CONTROLLER_LENGTH'); Object.defineProperty(window.history, 'length', { get: getHistoryLength, set () {}