www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit c3acdf04a6e2de57d39589a23dc81c8d8186d176
parent 3715f2c89ec7b9e91a802dd3f6d347ba1877a2ab
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu,  8 Jun 2006 21:08:50 +0000

Don't mark item as changed if setField('') is called on an empty field (i.e. prevent unnecessary save() calls)


Diffstat:
Mchrome/chromeFiles/content/scholar/xpcom/data_access.js | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -333,7 +333,8 @@ Scholar.Item.prototype.setField = function(field, value, loadIn){ } // If existing value, make sure it's actually changing - if (this._itemData[fieldID] && this._itemData[fieldID]==value){ + if ((!this._itemData[fieldID] && !value) || + (this._itemData[fieldID] && this._itemData[fieldID]==value)){ return false; } this._itemData[fieldID] = value;