Skip to content

Commit c6cbddc

Browse files
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

Diff for: src/driver/sqljs/SqljsQueryRunner.ts

+3-1
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)