Skip to content

Commit

Permalink
fix: prevent TypeError when calling bind function with sql.js 1.2.X (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
fb64 authored May 16, 2020
1 parent 327144a commit c6cbddc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/driver/sqljs/SqljsQueryRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ export class SqljsQueryRunner extends AbstractSqliteQueryRunner {
let statement: any;
try {
statement = databaseConnection.prepare(query);
statement.bind(parameters);
if (parameters) {
statement.bind(parameters);
}

// log slow queries if maxQueryExecution time is set
const maxQueryExecutionTime = this.driver.connection.options.maxQueryExecutionTime;
Expand Down

0 comments on commit c6cbddc

Please sign in to comment.