dexie 3.2.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.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * By David Fahlander, david.fahlander@gmail.com
6
6
  *
7
- * Version 3.2.1, Wed Feb 16 2022
7
+ * Version 3.2.2, Wed Apr 27 2022
8
8
  *
9
9
  * https://dexie.org
10
10
  *
package/dist/dexie.js CHANGED
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * By David Fahlander, david.fahlander@gmail.com
6
6
  *
7
- * Version 3.2.1, Wed Feb 16 2022
7
+ * Version 3.2.2, Wed Apr 27 2022
8
8
  *
9
9
  * https://dexie.org
10
10
  *
@@ -182,7 +182,7 @@
182
182
  obj[currentKeyPath] = value;
183
183
  else {
184
184
  var innerObj = obj[currentKeyPath];
185
- if (!innerObj)
185
+ if (!innerObj || !hasOwn(obj, currentKeyPath))
186
186
  innerObj = (obj[currentKeyPath] = {});
187
187
  setByKeyPath(innerObj, remainingKeyPath, value);
188
188
  }
@@ -1287,7 +1287,7 @@
1287
1287
  }
1288
1288
  }
1289
1289
 
1290
- var DEXIE_VERSION = '3.2.1';
1290
+ var DEXIE_VERSION = '3.2.2';
1291
1291
  var maxString = String.fromCharCode(65535);
1292
1292
  var minKey = -Infinity;
1293
1293
  var INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
@@ -5147,13 +5147,15 @@
5147
5147
  }
5148
5148
  catch (_a) { }
5149
5149
  });
5150
- addEventListener('storage', function (ev) {
5151
- if (ev.key === STORAGE_MUTATED_DOM_EVENT_NAME) {
5152
- var data = JSON.parse(ev.newValue);
5153
- if (data)
5154
- propagateLocally(data.changedParts);
5155
- }
5156
- });
5150
+ if (typeof addEventListener !== 'undefined') {
5151
+ addEventListener('storage', function (ev) {
5152
+ if (ev.key === STORAGE_MUTATED_DOM_EVENT_NAME) {
5153
+ var data = JSON.parse(ev.newValue);
5154
+ if (data)
5155
+ propagateLocally(data.changedParts);
5156
+ }
5157
+ });
5158
+ }
5157
5159
  var swContainer = self.document && navigator.serviceWorker;
5158
5160
  if (swContainer) {
5159
5161
  swContainer.addEventListener('message', propagateMessageLocally);