Fixed multiple reloads happening on launch (#1761)

* Fixed multiple reloads happening on launch

* Remove extra log statement
This commit is contained in:
Devin Binnie
2021-09-27 17:31:42 -04:00
committed by GitHub
parent c914903df9
commit 5df0657588

View File

@@ -93,8 +93,8 @@ export class ViewManager {
reloadViewIfNeeded = (viewName: string) => {
const view = this.views.get(viewName);
if (!view?.getWebContents()?.getURL().startsWith(view.tab.url.toString())) {
view?.load(view.tab.url);
if (view && !view.view.webContents.getURL().startsWith(view.tab.url.toString())) {
view.load(view.tab.url);
}
}