fix: provide a default empty array for parameters. (#5677) · typeorm/typeorm@9e8a8cf

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 9e8a8cf

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

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)