fix history navigation buttons in server, #3527

This commit is contained in:
zadam
2023-01-15 19:46:32 +01:00
parent 4f98c960ec
commit 743979266a
3 changed files with 6 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ export default class CommandButtonWidget extends AbstractButtonWidget {
/**
* @param {function|string} command
* @returns {CommandButtonWidget}
* @returns {this}
*/
command(command) {
this.settings.command = command;

View File

@@ -23,6 +23,10 @@ export default class HistoryNavigationButton extends ButtonFromNoteWidget {
doRender() {
super.doRender();
if (!utils.isElectron()) {
return;
}
this.webContents = utils.dynamicRequire('@electron/remote').getCurrentWebContents();
// without this the history is preserved across frontend reloads