From faa737d078a97e0eaee0f72b5c197163948d092d Mon Sep 17 00:00:00 2001 From: Benjamin Elfen Date: Wed, 7 Feb 2024 10:15:22 +0100 Subject: [PATCH] fix: assert that everything will work out --- src/components/7/Seven.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/7/Seven.tsx b/src/components/7/Seven.tsx index bd22ff2..5c75c68 100644 --- a/src/components/7/Seven.tsx +++ b/src/components/7/Seven.tsx @@ -16,8 +16,8 @@ export function Seven() { fetch(`https://swapi.dev/api/people/${count}`) .then((res) => res.json()) .then((data) => { - if (data instanceof Array) { - setApiData(data); + if (data) { + setApiData(data as object); } }) .catch(() => {