Skip to content

Commit

Permalink
fix: prevent TypeError when calling bind function with sql.js 1.2.X (t…
Browse files Browse the repository at this point in the history
  • Loading branch information
fb64 authored and Svetlozar committed Jan 12, 2021
1 parent d686d7d commit 78187cb
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 78187cb

Please sign in to comment.