Skip to content

Commit dc0a8eb

Browse files
asmsuechanandpor
authored andcommitted
Fix determination of db opened (#139)
1 parent be7079f commit dc0a8eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/sqlite.core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ SQLitePlugin.prototype.sqlBatch = function(sqlStatements, success, error) {
234234
SQLitePlugin.prototype.open = function(success, error) {
235235
var openerrorcb, opensuccesscb;
236236

237-
if (this.dbname in this.openDBs) {
237+
if (this.dbname in this.openDBs && this.openDBs[this.dbname] === DB_STATE_OPEN) {
238238
console.log('database already open: ' + this.dbname);
239239
nextTick((function(_this) {
240240
return function() {

0 commit comments

Comments
 (0)