mirror of
https://github.com/zotero/zotero.git
synced 2026-10-06 02:50:03 +00:00
...but don't try to trim null strings
This commit is contained in:
parent
e671496260
commit
4f4be436f6
1 changed files with 5 additions and 2 deletions
|
|
@ -93,8 +93,11 @@ Zotero.Translate.Sandbox = {
|
|||
if(translate._libraryID === false || translate._parentTranslator) {
|
||||
// remove null, undefined, and false properties
|
||||
for(var i in item) {
|
||||
if(!item[i] && item[i] !== 0) delete item[i];
|
||||
if(typeof item[i] === "string") item[i] = item[i].trim();
|
||||
if(!item[i] && item[i] !== 0) {
|
||||
delete item[i];
|
||||
} else if(typeof item[i] === "string") {
|
||||
item[i] = item[i].trim();
|
||||
}
|
||||
}
|
||||
|
||||
translate.newItems.push(item);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue