[open-ils-commits] r9564 - trunk/Open-ILS/web/js/dojo/fieldmapper
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon May 12 22:22:33 EDT 2008
Author: miker
Date: 2008-05-12 22:22:32 -0400 (Mon, 12 May 2008)
New Revision: 9564
Modified:
trunk/Open-ILS/web/js/dojo/fieldmapper/hash.js
Log:
allow null properties coming from objects
Modified: trunk/Open-ILS/web/js/dojo/fieldmapper/hash.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/fieldmapper/hash.js 2008-05-13 02:21:42 UTC (rev 9563)
+++ trunk/Open-ILS/web/js/dojo/fieldmapper/hash.js 2008-05-13 02:22:32 UTC (rev 9564)
@@ -29,10 +29,10 @@
return this;
}
- function _toHash () {
+ function _toHash (includeNulls) {
var _hash = {};
for ( var i=0; i < this._fields.length; i++) {
- if (this[this._fields[i]]() != null)
+ if (includeNulls || this[this._fields[i]]() != null)
_hash[this._fields[i]] = '' + this[this._fields[i]]();
}
return _hash;
More information about the open-ils-commits
mailing list