From a0f00763f0ed9a9ac404292ff1051d0dd7ddb250 Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Thu, 16 Jan 2025 00:33:48 +0700 Subject: [PATCH] update array data in snapshot correct when the new value is null --- lib/Onyx.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Onyx.ts b/lib/Onyx.ts index 483fd3ec..a2fcdde3 100644 --- a/lib/Onyx.ts +++ b/lib/Onyx.ts @@ -582,8 +582,8 @@ function updateSnapshots(data: OnyxUpdate[]) { return; } - if (Array.isArray(value)) { - updatedData[key] = value; + if (Array.isArray(value) || Array.isArray(snapshotData[key])) { + updatedData[key] = value || []; return; }