fix: initialize missing state vector with 0 for new client
This commit is contained in:
parent
443335fa73
commit
27299f7746
@ -265,7 +265,10 @@ const integrateStructs = (transaction, store, clientsStructRefs) => {
|
||||
*/
|
||||
const updateMissingSv = (client, clock) => {
|
||||
const mclock = missingSV.get(client)
|
||||
if (mclock == null || mclock > clock) {
|
||||
if (mclock === undefined) {
|
||||
// we never seen that client before
|
||||
missingSV.set(client, 0)
|
||||
} else if (mclock > clock) {
|
||||
missingSV.set(client, clock)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user