fix: prevent TypeError when calling bind function with sql.js 1.2.X (… · typeorm/typeorm@c6cbddc

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 c6cbddc

authored

fix: prevent TypeError when calling bind function with sql.js 1.2.X (#5789)

1 parent 327144a commit c6cbddc

File tree

1 file changed

+

3

-

1

lines changed

1 file changed

+

3

-

1

lines changed

Lines changed: 3 additions & 1 deletion

Original file line numberDiff line numberDiff line change

@@ -52,7 +52,9 @@ export class SqljsQueryRunner extends AbstractSqliteQueryRunner {

5252

let statement: any;

5353

try {

5454

statement = databaseConnection.prepare(query);

55-

statement.bind(parameters);

55+

if (parameters) {

56+

statement.bind(parameters);

57+

}

5658
5759

// log slow queries if maxQueryExecution time is set

5860

const maxQueryExecutionTime = this.driver.connection.options.maxQueryExecutionTime;

0 commit comments

Comments

 (0)