Fix setting of libraryID in createDataObject() support function
When another property was also set, setting libraryID would fail.
This commit is contained in:
parent
e465cf058e
commit
d32f23471e
1 changed files with 3 additions and 0 deletions
|
@ -371,6 +371,9 @@ function createUnsavedDataObject(objectType, params = {}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var obj = new Zotero[Zotero.Utilities.capitalize(objectType)](itemType);
|
var obj = new Zotero[Zotero.Utilities.capitalize(objectType)](itemType);
|
||||||
|
if (params.libraryID) {
|
||||||
|
obj.libraryID = params.libraryID;
|
||||||
|
}
|
||||||
|
|
||||||
switch (objectType) {
|
switch (objectType) {
|
||||||
case 'item':
|
case 'item':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue