Skip to content

Commit 9e8a8cf

Browse files
authored
fix: provide a default empty array for parameters. (#5677)
The statement bind method in sqljs assumes that either an object or an array has been provided.
1 parent d5cde49 commit 9e8a8cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/driver/sqljs/SqljsQueryRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class SqljsQueryRunner extends AbstractSqliteQueryRunner {
4141
/**
4242
* Executes a given SQL query.
4343
*/
44-
query(query: string, parameters?: any[]): Promise<any> {
44+
query(query: string, parameters: any[] = []): Promise<any> {
4545
if (this.isReleased)
4646
throw new QueryRunnerAlreadyReleasedError();
4747

0 commit comments

Comments
 (0)