Skip to content

Commit

Permalink
fix: assert that everything will work out
Browse files Browse the repository at this point in the history
  • Loading branch information
ElfenB committed Feb 7, 2024
1 parent cf10b49 commit faa737d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/7/Seven.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit faa737d

Please sign in to comment.