From e1eb37fbcccf8bcf5f083dd0a4e2b945139f5c6b Mon Sep 17 00:00:00 2001 From: Brad Adams Date: Sun, 7 May 2023 15:07:01 +0200 Subject: [PATCH] fix: remove duplicate conditional statement + Remove duplicate `typeof image` condition from the `getSanityRefId` fn --- src/useNextSanityImage.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/useNextSanityImage.ts b/src/useNextSanityImage.ts index d005322..3a94a0a 100644 --- a/src/useNextSanityImage.ts +++ b/src/useNextSanityImage.ts @@ -39,10 +39,6 @@ function getSanityRefId(image: SanityImageSource): string { const ref = image as SanityReference; const img = image as SanityAsset; - if (typeof image === 'string') { - return image; - } - if (obj.asset) { return obj.asset._ref || (obj.asset as SanityAsset)._id; }