Fix saving snapshots
This commit is contained in:
parent
ea7b955414
commit
f37a225a30
|
@ -191,8 +191,12 @@ Zotero.ProgressWindow = function(_window){
|
||||||
* Adds a line to the progress window with the specified icon
|
* Adds a line to the progress window with the specified icon
|
||||||
*/
|
*/
|
||||||
this.addLines = _deferUntilWindowLoad(function addLines(labels, icons) {
|
this.addLines = _deferUntilWindowLoad(function addLines(labels, icons) {
|
||||||
for (var i in labels) {
|
if(typeof labels === "object" && typeof icons === "object") {
|
||||||
new this.ItemProgress(icons[i], labels[i]);
|
for (var i in labels) {
|
||||||
|
new this.ItemProgress(icons[i], labels[i]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
new this.ItemProgress(icons, labels);
|
||||||
}
|
}
|
||||||
|
|
||||||
_move();
|
_move();
|
||||||
|
@ -433,7 +437,7 @@ Zotero.ProgressWindow = function(_window){
|
||||||
*/
|
*/
|
||||||
function _deferUntilWindowLoad(fn) {
|
function _deferUntilWindowLoad(fn) {
|
||||||
return function() {
|
return function() {
|
||||||
if(_window.closed) return;
|
if(_window && _window.closed) return;
|
||||||
|
|
||||||
if(_windowLoaded) {
|
if(_windowLoaded) {
|
||||||
fn.apply(this, Array.prototype.slice.call(arguments));
|
fn.apply(this, Array.prototype.slice.call(arguments));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user