summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-11-20 20:08:40 +0100
committerAleksander Machniak <alec@alec.pl>2013-11-20 20:08:40 +0100
commit4c8491275c42c75655ad3b1833b501a405868379 (patch)
tree0de1aa3498013ccbd3c829eef44da2ad7c7cf09b
parentba2d42f0be21c22c342407e4a2cf1b9c86f7c32f (diff)
Small fixes: variable scope
-rw-r--r--program/js/app.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 9b5b505dc..f36a3caa8 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1708,7 +1708,7 @@ function rcube_webmail()
url += (url.match(/\?/) ? '&' : '?') + '_extwin=1';
if (this.env.standard_windows)
- extwin = window.open(url, wname);
+ var extwin = window.open(url, wname);
else {
var win = this.is_framed() ? parent.window : window,
page = $(win),
@@ -1729,7 +1729,7 @@ function rcube_webmail()
}
// focus window, delayed to bring to front
- window.setTimeout(function() { extwin.focus(); }, 10);
+ window.setTimeout(function() { extwin && extwin.focus(); }, 10);
return extwin;
};