TypeError: Cannot read property 'v' of null
at ...../node_modules/cuba/src/parse-row.js:10:71
This happens when checking for null with:
result[schema[index]] = transform(typeof cell === 'object' ? cell.v : null)
When you do typeof null, you get 'object'.
It can be fixed by checking for the null with double negation, because the cell is either an object literal (which always returns true when used in conditional statements) or null:
result[schema[index]] = transform(!!cell ? cell.v : null)
This works fine with my data.
This happens when checking for null with:
When you do
typeof null, you get'object'.It can be fixed by checking for the null with double negation, because the cell is either an object literal (which always returns true when used in conditional statements) or null:
This works fine with my data.