-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Description
Issue type:
[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] cockroachdb
[ ] sqlite
[x] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)
Steps to reproduce or a small repository showing the problem:
Trying to query using the latest Sqljs and TypeORM throws an error: QueryFailedError: TypeError: Cannot convert undefined or null to object.
It turns out that when we have parameters in SqljsQueryRunner#query is undefined/null, the latest sqljs throws an error.
Harmless fix is to either skip the bind or give default value for parameters as an empty array within the SqljsQueryRunner only.
Tested in browser main thread, as well as worker thread. Both works.