From 4f4be436f6f65203618d2a3bb6f088849d816420 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sun, 3 Jul 2011 19:39:24 +0000 Subject: [PATCH] ...but don't try to trim null strings --- chrome/content/zotero/xpcom/translation/translate.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index de3cd856dd..5ffc1e0a24 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -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);