mirror of
https://github.com/zotero/zotero.git
synced 2026-10-04 02:31:47 +00:00
Trim all strings before adding to the DB
This commit is contained in:
parent
b876e8bf27
commit
e671496260
1 changed files with 1 additions and 0 deletions
|
|
@ -94,6 +94,7 @@ Zotero.Translate.Sandbox = {
|
|||
// 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();
|
||||
}
|
||||
|
||||
translate.newItems.push(item);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue