Skip to content

Commit

Permalink
fix: provide a default empty array for parameters. (#5677)
Browse files Browse the repository at this point in the history
The statement bind method in sqljs assumes that either an object or an array has been provided.
  • Loading branch information
graham- committed May 16, 2020
1 parent d5cde49 commit 9e8a8cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/driver/sqljs/SqljsQueryRunner.ts
Expand Up @@ -41,7 +41,7 @@ export class SqljsQueryRunner extends AbstractSqliteQueryRunner {
/**
* Executes a given SQL query.
*/
query(query: string, parameters?: any[]): Promise<any> {
query(query: string, parameters: any[] = []): Promise<any> {
if (this.isReleased)
throw new QueryRunnerAlreadyReleasedError();

Expand Down

0 comments on commit 9e8a8cf

Please sign in to comment.