dexie 4.4.2 → 4.4.3

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 4.4.2, Tue Mar 31 2026
7
+ * Version 4.4.3, Wed May 27 2026
8
8
  *
9
9
  * https://dexie.org
10
10
  *
@@ -184,8 +184,11 @@ function setByKeyPath(obj, keyPath, value) {
184
184
  obj[currentKeyPath] = value;
185
185
  else {
186
186
  var innerObj = obj[currentKeyPath];
187
- if (!innerObj || !hasOwn(obj, currentKeyPath))
187
+ if (!innerObj || !hasOwn(obj, currentKeyPath)) {
188
+ if (value === undefined)
189
+ return;
188
190
  innerObj = obj[currentKeyPath] = {};
191
+ }
189
192
  setByKeyPath(innerObj, remainingKeyPath, value);
190
193
  }
191
194
  }
@@ -1218,7 +1221,7 @@ function tempTransaction(db, mode, storeNames, fn) {
1218
1221
  }
1219
1222
  }
1220
1223
 
1221
- var DEXIE_VERSION = '4.4.2';
1224
+ var DEXIE_VERSION = '4.4.3';
1222
1225
  var maxString = String.fromCharCode(65535);
1223
1226
  var minKey = -Infinity;
1224
1227
  var INVALID_KEY_ARGUMENT = 'Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.';
@@ -2137,7 +2140,7 @@ var Collection = (function () {
2137
2140
  return cmp(aVal, bVal) * order;
2138
2141
  }
2139
2142
  return this.toArray(function (a) {
2140
- return a.sort(sorter);
2143
+ return a.slice().sort(sorter);
2141
2144
  }).then(cb);
2142
2145
  };
2143
2146
  Collection.prototype.toArray = function (cb) {
@@ -6324,7 +6327,7 @@ function liveQuery(querier) {
6324
6327
  };
6325
6328
  var ret = execute(ctx);
6326
6329
  if (!startedListening) {
6327
- globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME, mutationListener);
6330
+ globalEvents.storagemutated.subscribe(mutationListener);
6328
6331
  startedListening = true;
6329
6332
  }
6330
6333
  Promise.resolve(ret).then(function (result) {