Skip to content
Snippets Groups Projects
Commit 7656bf86 authored by Rufflewind's avatar Rufflewind Committed by Mateusz Kowalczyk
Browse files

Avoid JavaScript error during page load in non-frame mode

In non-frame mode, parent.window.synopsis refers to the synopsis div
rather than the nonexistent frame.  Unfortunately, the script wrongly
assumes that if it exists it must be a frame, leading to an error where
it tries to access the nonexistent attribute 'replace' of an undefined
value (synopsis.location).

Closes #406
parent 089d20c2
No related branches found
No related tags found
No related merge requests found
......@@ -229,7 +229,7 @@ function perform_search(full)
}
function setSynopsis(filename) {
if (parent.window.synopsis) {
if (parent.window.synopsis && parent.window.synopsis.location) {
if (parent.window.synopsis.location.replace) {
// In Firefox this avoids adding the change to the history.
parent.window.synopsis.location.replace(filename);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment