Error when adding a link or snapshot to the library (without a collection)
This commit is contained in:
parent
51664bc51a
commit
40edcdee91
|
@ -270,11 +270,13 @@ Zotero.Attachments = new function(){
|
||||||
mimeType, charsetID, sourceItemID);
|
mimeType, charsetID, sourceItemID);
|
||||||
|
|
||||||
// Add to collections
|
// Add to collections
|
||||||
|
if (parentCollectionIDs){
|
||||||
var ids = Zotero.flattenArguments(parentCollectionIDs);
|
var ids = Zotero.flattenArguments(parentCollectionIDs);
|
||||||
for each(var id in ids){
|
for each(var id in ids){
|
||||||
var col = Zotero.Collections.get(id);
|
var col = Zotero.Collections.get(id);
|
||||||
col.addItem(itemID);
|
col.addItem(itemID);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Run the fulltext indexer asynchronously (actually, it hangs the UI
|
// Run the fulltext indexer asynchronously (actually, it hangs the UI
|
||||||
// thread, but at least it lets the menu close)
|
// thread, but at least it lets the menu close)
|
||||||
|
@ -339,11 +341,13 @@ Zotero.Attachments = new function(){
|
||||||
charsetID, sourceItemID, itemID);
|
charsetID, sourceItemID, itemID);
|
||||||
|
|
||||||
// Add to collections
|
// Add to collections
|
||||||
|
if (parentCollectionIDs){
|
||||||
var ids = Zotero.flattenArguments(parentCollectionIDs);
|
var ids = Zotero.flattenArguments(parentCollectionIDs);
|
||||||
for each(var id in ids){
|
for each(var id in ids){
|
||||||
var col = Zotero.Collections.get(id);
|
var col = Zotero.Collections.get(id);
|
||||||
col.addItem(itemID);
|
col.addItem(itemID);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Zotero.DB.commitTransaction();
|
Zotero.DB.commitTransaction();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user