Skip to content

Commit

Permalink
Fix error when OLD PDF window has been destroyed (win obj persists)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjheslin committed Sep 23, 2022
1 parent e1905f4 commit 336935c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,7 @@ function showTLL (vol, pseudoUrl) {
}

var OLDwindow = null

function showOLD (pseudoUrl) {
oldDirUntrimmed = getOLDpath()
if (!oldDirUntrimmed) {
Expand All @@ -1082,7 +1083,7 @@ function showOLD (pseudoUrl) {
}
// We need to use loadURL, not loadFile, for #page= feature
var oldURL = 'file://' + oldDir + '#page=' + page
if (OLDwindow) {
if (OLDwindow && !OLDwindow.isDestroyed()) {
// As above
OLDwindow.close()
}
Expand Down

0 comments on commit 336935c

Please sign in to comment.