From 03ac2e7f92f82a8f067191fdf68c645c3d671011 Mon Sep 17 00:00:00 2001 From: pubkey <8926560+pubkey@users.noreply.github.com> Date: Mon, 18 Jul 2022 17:22:54 +0200 Subject: [PATCH] FIX flatClone _meta before mutating --- src/replication/downstream.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/replication/downstream.ts b/src/replication/downstream.ts index 5c586fd7c27..bf2c3ede013 100644 --- a/src/replication/downstream.ts +++ b/src/replication/downstream.ts @@ -16,6 +16,7 @@ import type { import { createRevision, ensureNotFalsy, + flatClone, getDefaultRevision, getDefaultRxDocumentMeta, now, @@ -339,7 +340,7 @@ export function startReplicationDownstream( {}, masterState, forkStateFullDoc ? { - _meta: forkStateFullDoc._meta, + _meta: flatClone(forkStateFullDoc._meta), _attachments: {}, _rev: getDefaultRevision() } : {