From e571da32fb3007d6cf2b8b4840a25e3b8fc5b80d Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Wed, 28 Feb 2024 10:55:02 +0800 Subject: [PATCH] use initialValue when cached value is undefined --- lib/withOnyx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/withOnyx.js b/lib/withOnyx.js index 2d91424c..46971a39 100644 --- a/lib/withOnyx.js +++ b/lib/withOnyx.js @@ -59,7 +59,7 @@ export default function (mapOnyxToState, shouldDelayUpdates = false) { (resultObj, mapping, propertyName) => { const key = Str.result(mapping.key, props); let value = Onyx.tryGetCachedValue(key, mapping); - if (!value && mapping.initialValue) { + if (value === undefined) { value = mapping.initialValue; }