You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
throws the following error when converting to mysql :
src/utils.js:12 Uncaught (in promise) TypeError: Cannot read property 'length' of null
at Object.exports.isTimestamp (src/utils.js:12)
at processObject (schemas/mysql.js:93)
at processObject (schemas/mysql.js:103)
at processObject (schemas/mysql.js:103)
at processObject (schemas/mysql.js:103)
at Object.Process [as mysql] (schemas/mysql.js:162)
as Utils.isTimestamp() doesn't like nulls instead of strings. Changing line 92 of mysql.js from :
if (type !== 'undefined') {
to
if (type !== 'undefined' && type !== 'null') {
seems to fix this, and the type for null fields like this (signature and payload in the example json above) becomes string, which in my case is the correct handling.
I haven't submitted a pull request as I'm not sure that this is the correct handling in all cases / the generic case, and I don't know enough about the code to know if it will cause any other unintended side effects.
Thanks for a great library.
The text was updated successfully, but these errors were encountered:
Just to add that I noticed when playing around this json also throws a similar error in bigquery(), but I know nothing of / don't use bigquery so I can't speculate whether a fix is needed there :
generate-schema/src/schemas/bigquery.js:28 Uncaught (in promise) TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at processFields (generate-schema/src/schemas/bigquery.js:28)
at generate-schema/src/schemas/bigquery.js:37
at Array.map (<anonymous>)
at processFields (generate-schema/src/schemas/bigquery.js:28)
at generate-schema/src/schemas/bigquery.js:37
at Array.map (<anonymous>)
at processFields generate-schema/src/schemas/bigquery.js:28)
at generate-schema/src/schemas/bigquery.js:37
at Array.map (<anonymous>)
The following json (partial from the github api) :
throws the following error when converting to mysql :
as Utils.isTimestamp() doesn't like nulls instead of strings. Changing line 92 of mysql.js from :
to
seems to fix this, and the type for null fields like this (signature and payload in the example json above) becomes string, which in my case is the correct handling.
I haven't submitted a pull request as I'm not sure that this is the correct handling in all cases / the generic case, and I don't know enough about the code to know if it will cause any other unintended side effects.
Thanks for a great library.
The text was updated successfully, but these errors were encountered: