Skip to content

Commit

Permalink
fixed bugs with server work
Browse files Browse the repository at this point in the history
  • Loading branch information
AsafMeizner committed Oct 10, 2024
1 parent 00c6035 commit 43faaea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export const updateScoutingDataFromAPI = async (password) => {
}

const data = await response.json();
if (data.entries && Array.isArray(data.entries)) {
saveScoutingData(data.entries);
if (data && Array.isArray(data)) {
saveScoutingData(data);
console.log('Scouting data updated successfully');
} else {
console.error('Invalid data format received from API');
Expand Down

0 comments on commit 43faaea

Please sign in to comment.