Skip to content

Commit

Permalink
Return consistent string type on fetch
Browse files Browse the repository at this point in the history
Empty string returned on failure
  • Loading branch information
Philippluca committed Aug 7, 2024
1 parent f5eb691 commit a1c5447
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Geopilot.Frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,9 @@ export const App: FC = () => {
return await response.json();
} else if (!contentType || responseContentType?.includes(contentType)) {
return await response.text();
} else {
return "";
}
} else {
return response;
}
return "";
};

useEffect(() => {
Expand Down

0 comments on commit a1c5447

Please sign in to comment.