diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js index 698615886..4c066879d 100644 --- a/chrome/content/zotero/browser.js +++ b/chrome/content/zotero/browser.js @@ -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