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.
@@ -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
  *
@@ -144,7 +144,7 @@ function setByKeyPath(obj, keyPath, value) {
144
144
  obj[currentKeyPath] = value;
145
145
  else {
146
146
  var innerObj = obj[currentKeyPath];
147
- if (!innerObj)
147
+ if (!innerObj || !hasOwn(obj, currentKeyPath))
148
148
  innerObj = (obj[currentKeyPath] = {});
149
149
  setByKeyPath(innerObj, remainingKeyPath, value);
150
150
  }
@@ -1242,7 +1242,7 @@ function tempTransaction(db, mode, storeNames, fn) {
1242
1242
  }
1243
1243
  }
1244
1244
 
1245
- const DEXIE_VERSION = '3.2.1';
1245
+ const DEXIE_VERSION = '3.2.2';
1246
1246
  const maxString = String.fromCharCode(65535);
1247
1247
  const minKey = -Infinity;
1248
1248
  const INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
@@ -5067,13 +5067,15 @@ else if (typeof self !== 'undefined' && typeof navigator !== 'undefined') {
5067
5067
  }
5068
5068
  catch (_a) { }
5069
5069
  });
5070
- addEventListener('storage', (ev) => {
5071
- if (ev.key === STORAGE_MUTATED_DOM_EVENT_NAME) {
5072
- const data = JSON.parse(ev.newValue);
5073
- if (data)
5074
- propagateLocally(data.changedParts);
5075
- }
5076
- });
5070
+ if (typeof addEventListener !== 'undefined') {
5071
+ addEventListener('storage', (ev) => {
5072
+ if (ev.key === STORAGE_MUTATED_DOM_EVENT_NAME) {
5073
+ const data = JSON.parse(ev.newValue);
5074
+ if (data)
5075
+ propagateLocally(data.changedParts);
5076
+ }
5077
+ });
5078
+ }
5077
5079
  const swContainer = self.document && navigator.serviceWorker;
5078
5080
  if (swContainer) {
5079
5081
  swContainer.addEventListener('message', propagateMessageLocally);