Ensure the progress bar is hidden if session initialisation fails
This commit is contained in:
parent
e31d706ee4
commit
8b36f33513
|
@ -388,6 +388,7 @@ Zotero.Integration = new function() {
|
|||
* @return {Zotero.Integration.Session} Promise
|
||||
*/
|
||||
this.getSession = async function (app, doc, agent) {
|
||||
try {
|
||||
var progressBar = new Zotero.Integration.Progress(4, Zotero.isMac && agent != 'http');
|
||||
progressBar.show();
|
||||
|
||||
|
@ -469,6 +470,10 @@ Zotero.Integration = new function() {
|
|||
throw e;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
progressBar.hide(true);
|
||||
throw e;
|
||||
}
|
||||
session.agent = agent;
|
||||
session._doc = doc;
|
||||
if (session.progressBar) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user