Fix error

It appears that not all statements can be finalized.
This commit is contained in:
Jeremy Ruston 2024-02-22 12:09:36 +00:00
parent 3fca82321e
commit a33705e348
1 changed files with 3 additions and 1 deletions

View File

@ -48,7 +48,9 @@ function SqlTiddlerDatabase(options) {
SqlTiddlerDatabase.prototype.close = function() {
for(const sql in this.statements) {
this.statements[sql].finalize();
if(this.statements[sql].finalize) {
this.statements[sql].finalize();
}
}
this.statements = Object.create(null);
this.db.close();