Fix saving when ZoteroPane.getSelectedLibraryID() or ZoteroPane.getSelectedCollection() throw because the Zotero pane has not yet been opened.

This commit is contained in:
Simon Kornblith 2011-09-05 22:45:10 +00:00
parent 4727e82a25
commit e9127cf295

View File

@ -150,12 +150,12 @@ var Zotero_Browser = new function() {
}
// get libraryID and collectionID
var libraryID, collectionID;
var libraryID = null, collectionID = null;
if(ZoteroPane && !Zotero.isConnector) {
libraryID = ZoteroPane.getSelectedLibraryID();
collectionID = ZoteroPane.getSelectedCollection(true);
} else {
libraryID = collectionID = null;
try {
libraryID = ZoteroPane.getSelectedLibraryID();
collectionID = ZoteroPane.getSelectedCollection(true);
} catch(e) {}
}
// translate into specified library and collection