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.
@@ -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
  *
@@ -147,8 +147,11 @@ function setByKeyPath(obj, keyPath, value) {
147
147
  obj[currentKeyPath] = value;
148
148
  else {
149
149
  var innerObj = obj[currentKeyPath];
150
- if (!innerObj || !hasOwn(obj, currentKeyPath))
150
+ if (!innerObj || !hasOwn(obj, currentKeyPath)) {
151
+ if (value === undefined)
152
+ return;
151
153
  innerObj = obj[currentKeyPath] = {};
154
+ }
152
155
  setByKeyPath(innerObj, remainingKeyPath, value);
153
156
  }
154
157
  }
@@ -1166,7 +1169,7 @@ function tempTransaction(db, mode, storeNames, fn) {
1166
1169
  }
1167
1170
  }
1168
1171
 
1169
- const DEXIE_VERSION = '4.4.2';
1172
+ const DEXIE_VERSION = '4.4.3';
1170
1173
  const maxString = String.fromCharCode(65535);
1171
1174
  const minKey = -Infinity;
1172
1175
  const INVALID_KEY_ARGUMENT = 'Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.';
@@ -2026,7 +2029,7 @@ class Collection {
2026
2029
  return cmp(aVal, bVal) * order;
2027
2030
  }
2028
2031
  return this.toArray(function (a) {
2029
- return a.sort(sorter);
2032
+ return a.slice().sort(sorter);
2030
2033
  }).then(cb);
2031
2034
  }
2032
2035
  toArray(cb) {
@@ -6108,7 +6111,7 @@ function liveQuery(querier) {
6108
6111
  };
6109
6112
  const ret = execute(ctx);
6110
6113
  if (!startedListening) {
6111
- globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME, mutationListener);
6114
+ globalEvents.storagemutated.subscribe(mutationListener);
6112
6115
  startedListening = true;
6113
6116
  }
6114
6117
  Promise.resolve(ret).then((result) => {