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 committed 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
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.