1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 16:52:25 +01:00

Adding some checks to check if win is defined

This commit is contained in:
Daniel Bainton
2008-08-13 09:22:18 +00:00
parent 3375daf359
commit 67b0492431
2 changed files with 3 additions and 1 deletions

View File

@@ -1454,6 +1454,8 @@ liberator.StatusLine = function () //{{{
if (!percent || typeof percent != "number")
{
var win = document.commandDispatcher.focusedWindow;
if (!win)
return;
percent = win.scrollMaxY == 0 ? -1 : win.scrollY / win.scrollMaxY;
}