We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb72cd4 commit 40f19d2Copy full SHA for 40f19d2
app.js
@@ -655,12 +655,14 @@ app.on('window-all-closed', () => {
655
});
656
657
ipcMain.on('sync-scroll', (event, data) => {
658
- viewerWindow.webContents.executeJavaScript(`
659
- document.querySelector('#verse-${data}').scrollIntoView({
660
- behavior: 'smooth',
661
- block: 'center'
662
- });
663
- `);
+ if (viewerWindow) {
+ viewerWindow.webContents.executeJavaScript(`
+ document.querySelector('#verse-${data}').scrollIntoView({
+ behavior: 'smooth',
+ block: 'center'
+ });
664
+ `);
665
+ }
666
667
668
ipcMain.on('enable-wc-webview', (event, data) => {
0 commit comments