Browse Source

feat: allow pages to override window.history.length (#17742)

* fix: allow pages to override window.history.length

* Update lib/renderer/window-setup.ts

Co-Authored-By: magne4000 <[email protected]>

* fix: lint error
Joël Charles 5 years ago
parent
commit
0bcfae752e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/renderer/window-setup.ts

+ 2 - 1
lib/renderer/window-setup.ts

@@ -242,7 +242,8 @@ export const windowSetup = (
   Object.defineProperty(window.history, 'length', {
     get: function () {
       return ipcRendererInternal.sendSync('ELECTRON_NAVIGATION_CONTROLLER_LENGTH')
-    }
+    },
+    set () {}
   })
 
   if (guestInstanceId != null) {