Skip to content

Commit

Permalink
Empty cell value set null
Browse files Browse the repository at this point in the history
  • Loading branch information
hokaccha committed Nov 9, 2011
1 parent fd53220 commit a337509
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/spreadsheets.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,13 @@ Worksheet.prototype.cells = function(opts, cb) {

var Row = function(data) {
Object.keys(data).forEach(function(key) {
var val;
if(key.substring(0, 4) === "gsx:") {
this[key.substring(4)] = data[key];
val = data[key];
if(typeof val === 'object' && Object.keys(val).length === 0) {
val = null;
}
this[key.substring(4)] = val;
}
}, this);
};
Expand Down

0 comments on commit a337509

Please sign in to comment.