Detect window safely
This commit is contained in:
parent
20e58a5b0b
commit
fc7f336c69
@ -67,7 +67,10 @@ if (typeof window == 'undefined' ||
|
|||||||
|
|
||||||
addTask : function(aTask, aBeginningValue, aTotalChange, aDuration, aRelatedWindow)
|
addTask : function(aTask, aBeginningValue, aTotalChange, aDuration, aRelatedWindow)
|
||||||
{
|
{
|
||||||
if (!aRelatedWindow && window && window instanceof window.Window)
|
if (!aRelatedWindow &&
|
||||||
|
window &&
|
||||||
|
typeof window.Window == 'function' &&
|
||||||
|
window instanceof window.Window)
|
||||||
aRelatedWindow = window;
|
aRelatedWindow = window;
|
||||||
|
|
||||||
if (!aTask || !aRelatedWindow) return;
|
if (!aTask || !aRelatedWindow) return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user