From a76eaef5bf29b678cdbee070bfbd5930d5868b10 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 13 Nov 2008 15:30:03 +0000 Subject: [PATCH] Fixes #1214, different translator behavior on the branch and the trunk Fix error when creator name field is left blank in two-field mode --- chrome/content/zotero/xpcom/data/creator.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/creator.js b/chrome/content/zotero/xpcom/data/creator.js index a6d1311bd8..65e5d236ad 100644 --- a/chrome/content/zotero/xpcom/data/creator.js +++ b/chrome/content/zotero/xpcom/data/creator.js @@ -77,7 +77,12 @@ Zotero.Creator.prototype._set = function (field, val) { case 'firstName': case 'lastName': case 'shortName': - val = value = Zotero.Utilities.prototype.trim(val); + if (val) { + val = value = Zotero.Utilities.prototype.trim(val); + } + else { + val = value = ''; + } break; }