dexie 3.2.1 → 3.2.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.d.ts +1 -1
- package/dist/dexie.js +15 -10
- package/dist/dexie.js.map +1 -1
- package/dist/dexie.min.js +1 -1
- package/dist/dexie.min.js.map +1 -1
- package/dist/dexie.mjs +15 -10
- package/dist/dexie.mjs.map +1 -1
- package/dist/modern/dexie.min.mjs +1 -1
- package/dist/modern/dexie.min.mjs.map +1 -1
- package/dist/modern/dexie.mjs +15 -10
- package/dist/modern/dexie.mjs.map +1 -1
- package/package.json +1 -1
package/dist/modern/dexie.mjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* By David Fahlander, david.fahlander@gmail.com
|
|
6
6
|
*
|
|
7
|
-
* Version 3.2.
|
|
7
|
+
* Version 3.2.3, Mon Jan 23 2023
|
|
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.
|
|
1245
|
+
const DEXIE_VERSION = '3.2.3';
|
|
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>.";
|
|
@@ -5037,6 +5037,9 @@ let propagatingLocally = false;
|
|
|
5037
5037
|
|
|
5038
5038
|
if (typeof BroadcastChannel !== 'undefined') {
|
|
5039
5039
|
const bc = new BroadcastChannel(STORAGE_MUTATED_DOM_EVENT_NAME);
|
|
5040
|
+
if (typeof bc.unref === 'function') {
|
|
5041
|
+
bc.unref();
|
|
5042
|
+
}
|
|
5040
5043
|
globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME, (changedParts) => {
|
|
5041
5044
|
if (!propagatingLocally) {
|
|
5042
5045
|
bc.postMessage(changedParts);
|
|
@@ -5067,13 +5070,15 @@ else if (typeof self !== 'undefined' && typeof navigator !== 'undefined') {
|
|
|
5067
5070
|
}
|
|
5068
5071
|
catch (_a) { }
|
|
5069
5072
|
});
|
|
5070
|
-
addEventListener
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5073
|
+
if (typeof addEventListener !== 'undefined') {
|
|
5074
|
+
addEventListener('storage', (ev) => {
|
|
5075
|
+
if (ev.key === STORAGE_MUTATED_DOM_EVENT_NAME) {
|
|
5076
|
+
const data = JSON.parse(ev.newValue);
|
|
5077
|
+
if (data)
|
|
5078
|
+
propagateLocally(data.changedParts);
|
|
5079
|
+
}
|
|
5080
|
+
});
|
|
5081
|
+
}
|
|
5077
5082
|
const swContainer = self.document && navigator.serviceWorker;
|
|
5078
5083
|
if (swContainer) {
|
|
5079
5084
|
swContainer.addEventListener('message', propagateMessageLocally);
|