diff --git a/src/utils/encoding.js b/src/utils/encoding.js index 08a9602d..1d84d495 100644 --- a/src/utils/encoding.js +++ b/src/utils/encoding.js @@ -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) } }