From ba0f238821ba23517b8e62e759f685b8cd67c0c6 Mon Sep 17 00:00:00 2001 From: Milan Susnjar Date: Tue, 22 Oct 2019 16:05:45 +0200 Subject: [PATCH] fix: remove cache property if using fallback iOS image has its own properties for cache and if fallback is true and regular image is being rendered we can't set FastImage's cache value because it doesn't match. --- src/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index e3fd17c..53627b7 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -143,9 +143,11 @@ function FastImageBase({ forwardedRef, ...props }: FastImageProps & { forwardedRef: React.Ref }) { - const resolvedSource = Image.resolveAssetSource(source as any) - if (fallback) { + const cleanedSource = { ...(source as any) } + delete cleanedSource.cache + const resolvedSource = Image.resolveAssetSource(cleanedSource) + return (