You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by kn...@apache.org on 2019/03/12 02:55:58 UTC

[cordova-plugin-file] branch travis_tests updated: close is added

This is an automated email from the ASF dual-hosted git repository.

knaito pushed a commit to branch travis_tests
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-file.git


The following commit(s) were added to refs/heads/travis_tests by this push:
     new e6949f1  close is added
e6949f1 is described below

commit e6949f19ef1d957706ecfbe7a8a32fa04aa86fcc
Author: knaito <kn...@asial.co.jp>
AuthorDate: Tue Mar 12 11:55:42 2019 +0900

    close is added
---
 src/browser/FileProxy.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/browser/FileProxy.js b/src/browser/FileProxy.js
index 87903fe..33eed4c 100644
--- a/src/browser/FileProxy.js
+++ b/src/browser/FileProxy.js
@@ -828,6 +828,10 @@
         idb_.open = function (dbName, successCallback, errorCallback) {
             var self = this;
 
+            if (self.db != null) {
+                self.close();
+            }
+
             // TODO: FF 12.0a1 isn't liking a db name with : in it.
             window.customLog('log', 'idb_.open is called');
             var request = indexedDB.open(dbName.replace(':', '_')/*, 1 /*version */);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org