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
fb64 authored May 16, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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
@@ -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;

0 comments on commit c6cbddc

Please sign in to comment.