Browse Source

Add additional stop check for album fetch

master
jeffvli 3 years ago
committed by Jeff
parent
commit
1c684afc87
  1. 2
      src/api/api.ts

2
src/api/api.ts

@ -424,7 +424,7 @@ export const getAllAlbums = (
}, },
}) })
.then((res) => { .then((res) => {
if (!res.data.albumList2.album) { if (!res.data.albumList2.album || res.data.albumList2.album.length === 0) {
// Flatten the array and return once there are no more albums left // Flatten the array and return once there are no more albums left
const flattened = _.flatten(data); const flattened = _.flatten(data);
return flattened.map((entry: any, index: any) => ({ return flattened.map((entry: any, index: any) => ({

Loading…
Cancel
Save