commit f5812852cbebde2e660613e74706466a3d429e3d
parent 0be2796500d10153bd84aa25a6c4fa3b4d8bf75f
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 20 May 2016 16:22:28 -0400
Default to My Library if pane not yet open saving snapshot from connector
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/server_connector.js b/chrome/content/zotero/xpcom/server_connector.js
@@ -412,15 +412,17 @@ Zotero.Server.Connector.SaveSnapshot.prototype = {
"init":function(url, data, sendResponseCallback) {
Zotero.Server.Connector.Data[data["url"]] = "<html>"+data["html"]+"</html>";
- // figure out where to save
- var libraryID = null;
- var collectionID = null;
var zp = Zotero.getActiveZoteroPane();
try {
var libraryID = zp.getSelectedLibraryID();
var collection = zp.getSelectedCollection();
} catch(e) {}
+ // Default to personal library if pane not yet opened
+ if (!libraryID) {
+ libraryID = Zotero.Libraries.userLibraryID
+ }
+
// determine whether snapshot can be saved
var filesEditable;
if (libraryID) {