commit e9127cf295f67d27f88a375e7c5d042bf38b43f1 parent 4727e82a25daca5084bd2712968ce1910feecf99 Author: Simon Kornblith <simon@simonster.com> Date: Mon, 5 Sep 2011 22:45:10 +0000 Fix saving when ZoteroPane.getSelectedLibraryID() or ZoteroPane.getSelectedCollection() throw because the Zotero pane has not yet been opened. Diffstat:
| M | chrome/content/zotero/browser.js | | | 10 | +++++----- |
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git 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