From 4411ae1564d716e5aa063e4c47302ffc907a078a Mon Sep 17 00:00:00 2001 From: Michael Foiani Date: Tue, 20 Apr 2021 12:49:22 -0400 Subject: Fixed the crash if no data in timetime and hid if an investor has no holidngs. --- react-frontend/src/components/WatchDogs.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'react-frontend/src/components/WatchDogs.js') diff --git a/react-frontend/src/components/WatchDogs.js b/react-frontend/src/components/WatchDogs.js index dfe47c8..f7a9e74 100644 --- a/react-frontend/src/components/WatchDogs.js +++ b/react-frontend/src/components/WatchDogs.js @@ -51,6 +51,11 @@ function WatchDogs() { //TODO: optimize this //const sliced = data.holders.slice(0, 500); //console.log(sliced); + console.log(data); + if(data.holders.length === 0) { + alert("There is no data between those timeframes :("); + return; + } setData(data.holders); setHasLoaded(true); }) -- cgit v1.2.3-70-g09d2