dexie 3.2.1-beta.1 → 3.2.2

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/dist/dexie.mjs CHANGED
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * By David Fahlander, david.fahlander@gmail.com
6
6
  *
7
- * Version 3.2.1-beta.1, Fri Nov 19 2021
7
+ * Version 3.2.2, Wed Apr 27 2022
8
8
  *
9
9
  * https://dexie.org
10
10
  *
@@ -176,7 +176,7 @@ function setByKeyPath(obj, keyPath, value) {
176
176
  obj[currentKeyPath] = value;
177
177
  else {
178
178
  var innerObj = obj[currentKeyPath];
179
- if (!innerObj)
179
+ if (!innerObj || !hasOwn(obj, currentKeyPath))
180
180
  innerObj = (obj[currentKeyPath] = {});
181
181
  setByKeyPath(innerObj, remainingKeyPath, value);
182
182
  }
@@ -1281,7 +1281,7 @@ function tempTransaction(db, mode, storeNames, fn) {
1281
1281
  }
1282
1282
  }
1283
1283
 
1284
- var DEXIE_VERSION = '3.2.1-beta.1';
1284
+ var DEXIE_VERSION = '3.2.2';
1285
1285
  var maxString = String.fromCharCode(65535);
1286
1286
  var minKey = -Infinity;
1287
1287
  var INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
@@ -5141,13 +5141,15 @@ else if (typeof self !== 'undefined' && typeof navigator !== 'undefined') {
5141
5141
  }
5142
5142
  catch (_a) { }
5143
5143
  });
5144
- addEventListener('storage', function (ev) {
5145
- if (ev.key === STORAGE_MUTATED_DOM_EVENT_NAME) {
5146
- var data = JSON.parse(ev.newValue);
5147
- if (data)
5148
- propagateLocally(data.changedParts);
5149
- }
5150
- });
5144
+ if (typeof addEventListener !== 'undefined') {
5145
+ addEventListener('storage', function (ev) {
5146
+ if (ev.key === STORAGE_MUTATED_DOM_EVENT_NAME) {
5147
+ var data = JSON.parse(ev.newValue);
5148
+ if (data)
5149
+ propagateLocally(data.changedParts);
5150
+ }
5151
+ });
5152
+ }
5151
5153
  var swContainer = self.document && navigator.serviceWorker;
5152
5154
  if (swContainer) {
5153
5155
  swContainer.addEventListener('message', propagateMessageLocally);