@cocreate/indexeddb 1.7.5 → 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,17 @@
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
+
8
+ ## [1.7.6](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.7.5...v1.7.6) (2023-04-11)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * createDb ([77778af](https://github.com/CoCreate-app/CoCreate-indexeddb/commit/77778afee56354fd0aac0ff7e9491af21332d681))
14
+
1
15
  ## [1.7.5](https://github.com/CoCreate-app/CoCreate-indexeddb/compare/v1.7.4...v1.7.5) (2023-04-11)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/indexeddb",
3
- "version": "1.7.5",
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
@@ -1020,7 +1020,6 @@ function generateDB(data) {
1020
1020
  document: {
1021
1021
  _id: organization_id,
1022
1022
  name: 'untitled',
1023
- apiKey,
1024
1023
  organization_id
1025
1024
  }
1026
1025
  }
@@ -1057,7 +1056,8 @@ function generateDB(data) {
1057
1056
  "runIndustry": "",
1058
1057
  "sendgrid": ["sendEmail"]
1059
1058
  },
1060
- "admin": "false",
1059
+ admin: "false",
1060
+ primary: true,
1061
1061
  organization_id
1062
1062
  }
1063
1063
  }
@@ -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
  }