Fix saving when ZoteroPane.getSelectedLibraryID() or ZoteroPane.getSelectedCollection() throw because the Zotero pane has not yet been opened.
This commit is contained in:
parent
4727e82a25
commit
e9127cf295
|
@ -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) {
|
||||||
|
try {
|
||||||
libraryID = ZoteroPane.getSelectedLibraryID();
|
libraryID = ZoteroPane.getSelectedLibraryID();
|
||||||
collectionID = ZoteroPane.getSelectedCollection(true);
|
collectionID = ZoteroPane.getSelectedCollection(true);
|
||||||
} else {
|
} catch(e) {}
|
||||||
libraryID = collectionID = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// translate into specified library and collection
|
// translate into specified library and collection
|
||||||
|
|
Loading…
Reference in New Issue
Block a user