Skip to content

Commit 9c6fb73

Browse files
committed
fix chat section not updating
1 parent a7c1666 commit 9c6fb73

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/OnyxUtils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,10 @@ function updateSnapshots(data: OnyxUpdate[], mergeFn: typeof Onyx.merge): Array<
14171417
}
14181418

14191419
const oldValue = updatedData[key] || {};
1420-
const newValue = lodashPick(value, Object.keys(snapshotData[key]));
1420+
const snapshotKeys = Object.keys(snapshotData[key] || {});
1421+
const valueKeys = Object.keys(value ?? {});
1422+
const hasNewKeys = valueKeys.some((k) => !snapshotKeys.includes(k));
1423+
const newValue = hasNewKeys ? value : lodashPick(value, snapshotKeys);
14211424

14221425
updatedData = {...updatedData, [key]: Object.assign(oldValue, newValue)};
14231426
});

0 commit comments

Comments
 (0)