Skip to content

Commit

Permalink
Update parse-row.js
Browse files Browse the repository at this point in the history
This change fixes this issue – yuanqing#6
  • Loading branch information
Exiliot authored Dec 11, 2020
1 parent 4795381 commit f688d55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function identity (object) {
module.exports = function (schema, row, transform) {
transform = transform || identity
return row.reduce(function (result, cell, index) {
result[schema[index]] = transform(typeof cell === 'object' ? cell.v : null)
result[schema[index]] = transform(!!cell ? cell.v : null)
return result
}, {})
}

0 comments on commit f688d55

Please sign in to comment.