aboutsummaryrefslogtreecommitdiff
path: root/react-frontend/src/components/WatchDogs.js
diff options
context:
space:
mode:
authorMichael Foiani <sotech117@michaels-mbp-3.lan>2021-04-20 12:49:22 -0400
committerMichael Foiani <sotech117@michaels-mbp-3.lan>2021-04-20 12:49:22 -0400
commit4411ae1564d716e5aa063e4c47302ffc907a078a (patch)
tree139d757cd3152b83f452000d9fe4ed6eeb7ef497 /react-frontend/src/components/WatchDogs.js
parente359237bb2820b830b8b48c73f87e944d19baecb (diff)
Fixed the crash if no data in timetime and hid if an investor has no holidngs.
Diffstat (limited to 'react-frontend/src/components/WatchDogs.js')
-rw-r--r--react-frontend/src/components/WatchDogs.js5
1 files changed, 5 insertions, 0 deletions
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);
})