From f5812852cbebde2e660613e74706466a3d429e3d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 20 May 2016 16:22:28 -0400 Subject: [PATCH] Default to My Library if pane not yet open saving snapshot from connector --- chrome/content/zotero/xpcom/server_connector.js | 8 +++++--- 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 index b5b726304..cccc42a4c 100644 --- 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"]] = ""+data["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) {