Don't restart in connector mode on Zotero.init() failure
I broke this in a723c85999
This commit is contained in:
parent
ea50098d30
commit
1ee015317f
1 changed files with 9 additions and 5 deletions
|
@ -295,11 +295,15 @@ function ZoteroService() {
|
|||
try {
|
||||
zContext.Zotero.init(zInitOptions);
|
||||
} catch(e) {
|
||||
// if Zotero should start as a connector, reload it
|
||||
zContext.Zotero.shutdown().then(function() {
|
||||
makeZoteroContext(true);
|
||||
zContext.Zotero.init(zInitOptions);
|
||||
}).done();
|
||||
if(e === "ZOTERO_SHOULD_START_AS_CONNECTOR") {
|
||||
// if Zotero should start as a connector, reload it
|
||||
zContext.Zotero.shutdown().then(function() {
|
||||
makeZoteroContext(true);
|
||||
zContext.Zotero.init(zInitOptions);
|
||||
}).done();
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
isFirstLoadThisSession = false; // no longer first load
|
||||
|
|
Loading…
Reference in a new issue