Skip to content

Commit 1fe65e4

Browse files
committed
UI - fix empty pet list error
1 parent 06ea4dd commit 1fe65e4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/client/src/pages/DataView360/components/Adoptions.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ class Adoptions extends Component {
4242
getLatestPets(petList) {
4343
let retVal;
4444

45-
retVal = petList.slice(0, PET_COUNT);
45+
if (petList) {
46+
retVal = petList.slice(0, PET_COUNT);
47+
}
48+
4649

4750
return retVal;
4851
}

0 commit comments

Comments
 (0)