From d434ff273bd03d002f212ae0cd3f487f4907d58e Mon Sep 17 00:00:00 2001
From: Noah <noah.matthew@metzger.cc>
Date: Sun, 7 Apr 2024 14:15:16 -0500
Subject: [PATCH] fix(times): Don't start bubbletea table if time log slice is
 empty (fix #15)

---
 times.go | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/times.go b/times.go
index dfbf3a7..060cfc4 100644
--- a/times.go
+++ b/times.go
@@ -39,12 +39,16 @@ func times() {
 			duration: took,
 		})
 	})
-	p.Send(IndicatorInfo{
-		info:     "Done!",
-		quitting: true,
-	})
+
 	finished = true
+	p.Send(IndicatorInfo{info: "Done", quitting: true})
 	p.Quit()
+	p.Wait()
+
+	if len(times) == 0 {
+		fmt.Printf("No time logs found for the specified date!\n")
+		os.Exit(0)
+	}
 
 	var total_time time.Duration