@nxtedition/deepstream.io-client-js 23.4.60 → 23.4.61
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/package.json +1 -1
- package/src/record/record.js +6 -12
package/package.json
CHANGED
package/src/record/record.js
CHANGED
|
@@ -53,20 +53,14 @@ class Record {
|
|
|
53
53
|
this._handler._onPruning(this, false)
|
|
54
54
|
this._subscribed = this._subscribed || this._sendMsg1(C.ACTIONS.SUBSCRIBE, this._name)
|
|
55
55
|
}
|
|
56
|
-
|
|
57
56
|
return this
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
unref() {
|
|
61
|
-
invariant(this._refs > 0, 'missing refs')
|
|
62
|
-
invariant(this._refs > 0 || !this._patching, 'must not have patches')
|
|
63
|
-
invariant(this._refs > 0 || this._state >= C.RECORD_STATE.SERVER, 'must be ready')
|
|
64
|
-
|
|
65
60
|
this._refs -= 1
|
|
66
61
|
if (this._refs === 0) {
|
|
67
62
|
this._handler._onPruning(this, true)
|
|
68
63
|
}
|
|
69
|
-
|
|
70
64
|
return this
|
|
71
65
|
}
|
|
72
66
|
|
|
@@ -344,10 +338,10 @@ class Record {
|
|
|
344
338
|
|
|
345
339
|
if (value) {
|
|
346
340
|
this._patching = []
|
|
347
|
-
this.
|
|
341
|
+
this.ref()
|
|
348
342
|
} else {
|
|
349
343
|
this._patching = null
|
|
350
|
-
this.
|
|
344
|
+
this.unref()
|
|
351
345
|
}
|
|
352
346
|
|
|
353
347
|
this._handler._onPatching(this, value)
|
|
@@ -358,10 +352,10 @@ class Record {
|
|
|
358
352
|
|
|
359
353
|
if (value) {
|
|
360
354
|
this._updating = new Map()
|
|
361
|
-
this.
|
|
355
|
+
this.ref()
|
|
362
356
|
} else {
|
|
363
357
|
this._updating = null
|
|
364
|
-
this.
|
|
358
|
+
this.unref()
|
|
365
359
|
}
|
|
366
360
|
|
|
367
361
|
this._handler._onUpdating(this, value)
|
|
@@ -370,10 +364,10 @@ class Record {
|
|
|
370
364
|
_onPending(value) {
|
|
371
365
|
if (value) {
|
|
372
366
|
this._pending = true
|
|
373
|
-
this.
|
|
367
|
+
this.ref()
|
|
374
368
|
} else {
|
|
375
369
|
this._pending = false
|
|
376
|
-
this.
|
|
370
|
+
this.unref()
|
|
377
371
|
}
|
|
378
372
|
|
|
379
373
|
this._handler._onPending(this, value)
|