Skip to content

Commit

Permalink
Fix possible idb init close issue
Browse files Browse the repository at this point in the history
  • Loading branch information
svk31 committed Sep 14, 2017
1 parent 90af0b1 commit dc6655c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/idb-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ var iDB = (function () {
},

close: function () {
if (_instance) _instance.db().close()
idb_helper.set_graphene_db(null)
_instance = undefined
if (_instance && _instance.db()) _instance.db().close();
idb_helper.set_graphene_db(null);
_instance = undefined;
},

add_to_store: function (store_name, value) {
Expand Down

0 comments on commit dc6655c

Please sign in to comment.