@cocreate/indexeddb 1.7.6 → 1.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.7.7](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.7.6...v1.7.7) (2023-04-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * test indexeddb using databases() instead of open(). open caused a db to be created ([7112717](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/711271719e108484e7752a66ad2dcb9b5184c197))
7
+
1
8
  ## [1.7.6](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.7.5...v1.7.6) (2023-04-11)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/indexeddb",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
4
4
  "description": "A simple indexeddb component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "indexeddb",
package/src/index.js CHANGED
@@ -1171,14 +1171,9 @@ function init() {
1171
1171
  return;
1172
1172
  } else {
1173
1173
  try {
1174
- let openRequest = indexedDB.open('database');
1175
- openRequest.onsuccess = function() {
1176
- let db = openRequest.result;
1177
- db.close()
1178
- }
1179
- if (window.CoCreateConfig)
1180
- if (window.CoCreateConfig.indexeddb !== false)
1181
- setStatus(true)
1174
+ indexedDB.databases()
1175
+ if (window.CoCreateConfig && window.CoCreateConfig.indexeddb !== false)
1176
+ setStatus(true)
1182
1177
  } catch(e) {
1183
1178
  setStatus(false);
1184
1179
  }