Closed pieh closed 6 years ago
Regex here https://github.com/brandonmp/gatsby-source-google-sheets/blob/master/src/fetch-sheet.js#L57 will remove emoji from value and if cell contains only emoji this will leave empty string which will be treated as number (!isNaN('') === true) and value will be converted to 0.
!isNaN('') === true
This breaks type infering for that column in gatsby - https://github.com/gatsbyjs/gatsby/issues/3913
Sheet that can be used to reproduce - https://docs.google.com/spreadsheets/d/19Q6wT_RKouS9PQTBxsAiek8fv-fSpCzO2zXB1tL_W-Y/edit#gid=0 (cell E57).
I'm not familiar with google sheets api. Is there a way to get numeric value without applied formatting? It seems that it's not possible when using getRows function.
getRows
thanks @pieh , this should be fixed.
i added the "🔑🔑🔑🔑🔑🔑🔑🔑🔑🔑🔑🔑🔑" to a unit test to make sure this stays fixed
Regex here https://github.com/brandonmp/gatsby-source-google-sheets/blob/master/src/fetch-sheet.js#L57 will remove emoji from value and if cell contains only emoji this will leave empty string which will be treated as number (
!isNaN('') === true
) and value will be converted to 0.This breaks type infering for that column in gatsby - https://github.com/gatsbyjs/gatsby/issues/3913
Sheet that can be used to reproduce - https://docs.google.com/spreadsheets/d/19Q6wT_RKouS9PQTBxsAiek8fv-fSpCzO2zXB1tL_W-Y/edit#gid=0 (cell E57).
I'm not familiar with google sheets api. Is there a way to get numeric value without applied formatting? It seems that it's not possible when using
getRows
function.