@cuboapp/crdt 1.0.25 → 1.0.26
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/client/index.ts +2 -4
package/package.json
CHANGED
package/src/client/index.ts
CHANGED
|
@@ -425,15 +425,13 @@ export class CuboCrdtClient<M> {
|
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
|
|
428
|
-
public update<K extends string
|
|
428
|
+
public update<K extends Extract<keyof M, string>>(
|
|
429
429
|
entity: K,
|
|
430
430
|
entity_id: number,
|
|
431
431
|
dto: K extends Extract<keyof M, string> ? Partial<M[K]> : object,
|
|
432
432
|
opts?: CuboCrdtClientDocOrigin
|
|
433
433
|
) {
|
|
434
|
-
const
|
|
435
|
-
|
|
436
|
-
const document = this.docs.get(storeKey)
|
|
434
|
+
const document = this.docs.get(`${entity}:${entity_id}`)
|
|
437
435
|
|
|
438
436
|
if (document) {
|
|
439
437
|
const map = document.doc.getMap()
|