Don't restart in connector mode on Zotero.init() failure

I broke this in a723c85999
This commit is contained in:
Simon Kornblith 2013-12-11 14:50:48 -05:00
parent ea50098d30
commit 1ee015317f

View File

@ -295,11 +295,15 @@ function ZoteroService() {
try { try {
zContext.Zotero.init(zInitOptions); zContext.Zotero.init(zInitOptions);
} catch(e) { } catch(e) {
// if Zotero should start as a connector, reload it if(e === "ZOTERO_SHOULD_START_AS_CONNECTOR") {
zContext.Zotero.shutdown().then(function() { // if Zotero should start as a connector, reload it
makeZoteroContext(true); zContext.Zotero.shutdown().then(function() {
zContext.Zotero.init(zInitOptions); makeZoteroContext(true);
}).done(); zContext.Zotero.init(zInitOptions);
}).done();
} else {
throw e;
}
} }
} }
isFirstLoadThisSession = false; // no longer first load isFirstLoadThisSession = false; // no longer first load