From ae90ce587880ad6fad546a1957aff6cd157690c0 Mon Sep 17 00:00:00 2001 From: Andrey Goncharov Date: Fri, 1 Jul 2022 03:42:11 -0700 Subject: [PATCH] Fix electron reloading Reviewed By: antonk52 Differential Revision: D37556134 fbshipit-source-id: 7ff301bd6d06f570559b38647462515c35c899f3 --- desktop/static/setupMenuBar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/static/setupMenuBar.tsx b/desktop/static/setupMenuBar.tsx index 3904b363f..96c356064 100644 --- a/desktop/static/setupMenuBar.tsx +++ b/desktop/static/setupMenuBar.tsx @@ -44,8 +44,8 @@ function getTemplate( { label: 'Reload', accelerator: 'CmdOrCtrl+R', - click: function (_, _focusedWindow: electron.BrowserWindow | undefined) { - window.location.reload(); + click: function (_, focusedWindow: electron.BrowserWindow | undefined) { + focusedWindow?.reload(); }, }, {