@live-change/db 0.8.22 → 0.8.24
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/Index.js +2 -2
- package/package.json +5 -5
package/lib/Index.js
CHANGED
|
@@ -54,7 +54,7 @@ class RangeReader extends ChangeStream {
|
|
|
54
54
|
return {
|
|
55
55
|
dispose() {
|
|
56
56
|
const callbackIndex = this.callbacks.indexOf(cb)
|
|
57
|
-
if(callbackIndex
|
|
57
|
+
if(callbackIndex === -1) throw new Error('Observer double dispose')
|
|
58
58
|
this.callbacks.splice(callbackIndex, 1)
|
|
59
59
|
/// TODO: dispose or ignore reader somehow if no callbacks
|
|
60
60
|
}
|
|
@@ -449,7 +449,7 @@ class IndexWriter {
|
|
|
449
449
|
change(obj, oldObj) {
|
|
450
450
|
try {
|
|
451
451
|
if (obj) {
|
|
452
|
-
if (oldObj && oldObj.id
|
|
452
|
+
if (oldObj && oldObj.id !== obj.id) {
|
|
453
453
|
this.index.delete(oldObj.id)
|
|
454
454
|
this.index.put(obj)
|
|
455
455
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/db",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.24",
|
|
4
4
|
"description": "Database with observable data for live queries",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"type": "module",
|
|
23
23
|
"homepage": "https://github.com/live-change/live-change-stack",
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@live-change/db-store-level": "^0.8.
|
|
26
|
-
"@live-change/db-store-lmdb": "^0.8.
|
|
25
|
+
"@live-change/db-store-level": "^0.8.24",
|
|
26
|
+
"@live-change/db-store-lmdb": "^0.8.24",
|
|
27
27
|
"minimist": ">=1.2.3",
|
|
28
28
|
"next-tick": "^1.1.0",
|
|
29
29
|
"rimraf": "^5.0.5",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"websocket-extensions": ">=0.1.4"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@live-change/dao": "^0.8.
|
|
35
|
+
"@live-change/dao": "^0.8.24",
|
|
36
36
|
"get-random-values": "^1.2.2",
|
|
37
37
|
"node-interval-tree": "^1.3.3"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "63e942caccbcb1c9bfbd1a3ef1d097124514c5a7"
|
|
40
40
|
}
|