@live-change/db-store-indexeddb 0.6.5 → 0.6.6
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/lib/Store.js +6 -2
- package/package.json +3 -3
package/lib/Store.js
CHANGED
|
@@ -572,10 +572,12 @@ class Store {
|
|
|
572
572
|
count++
|
|
573
573
|
const id = cursor.key
|
|
574
574
|
const json = cursor.value
|
|
575
|
-
|
|
575
|
+
let object = this.serialization.parse(json)
|
|
576
576
|
last = id
|
|
577
577
|
await handleRequest(cursor.delete())
|
|
578
578
|
|
|
579
|
+
if(!object || !object.id) object = { id }
|
|
580
|
+
|
|
579
581
|
const objectObservable = this.objectObservables.get(id)
|
|
580
582
|
if(objectObservable) objectObservable.set(null)
|
|
581
583
|
const rangeObservables = this.rangeObservablesTree.search([id, id])
|
|
@@ -605,10 +607,12 @@ class Store {
|
|
|
605
607
|
count++
|
|
606
608
|
const id = cursor.key
|
|
607
609
|
const json = cursor.value
|
|
608
|
-
|
|
610
|
+
let object = this.serialization.parse(json)
|
|
609
611
|
last = id
|
|
610
612
|
await handleRequest(cursor.delete())
|
|
611
613
|
|
|
614
|
+
if(!object || !object.id) object = { id }
|
|
615
|
+
|
|
612
616
|
const objectObservable = this.objectObservables.get(id)
|
|
613
617
|
if(objectObservable) objectObservable.set(null)
|
|
614
618
|
const rangeObservables = this.rangeObservablesTree.search([id, id])
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/db-store-indexeddb",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"description": "Database with observable data for live queries",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"tape": "^5.3.2"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@live-change/dao": "0.5.
|
|
29
|
+
"@live-change/dao": "0.5.18",
|
|
30
30
|
"@live-change/interval-tree": "^1.0.12",
|
|
31
31
|
"broadcast-channel": "^4.2.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "3a16e043de07836bc79e82c9c519cc7bf48d57a3"
|
|
34
34
|
}
|