Fix Import placing items in feeds/uneditable libraries

This commit is contained in:
Abe Jellinek 2022-02-21 15:40:19 -08:00
parent 9cdcb2fd7c
commit 198ae65b4a

View file

@ -426,10 +426,14 @@ var Zotero_File_Interface = new function() {
} }
else if (!createNewCollection) { else if (!createNewCollection) {
try { try {
if (!ZoteroPane.collectionsView.editable) { let zp = Zotero.getActiveZoteroPane();
ZoteroPane.collectionsView.selectLibrary(null); if (!zp.canEdit()) {
yield zp.collectionsView.selectLibrary(Zotero.Libraries.userLibraryID);
} }
} catch(e) {} }
catch (e) {
Zotero.logError(e);
}
} }
var defaultNewCollectionPrefix = Zotero.getString("fileInterface.imported"); var defaultNewCollectionPrefix = Zotero.getString("fileInterface.imported");