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 // get libraryID and collectionID
var libraryID, collectionID; var libraryID = null, collectionID = null;
if(ZoteroPane && !Zotero.isConnector) { if(ZoteroPane && !Zotero.isConnector) {
libraryID = ZoteroPane.getSelectedLibraryID(); try {
collectionID = ZoteroPane.getSelectedCollection(true); libraryID = ZoteroPane.getSelectedLibraryID();
} else { collectionID = ZoteroPane.getSelectedCollection(true);
libraryID = collectionID = null; } catch(e) {}
} }
// translate into specified library and collection // translate into specified library and collection