aboutsummaryrefslogtreecommitdiff
path: root/search_controller.go
diff options
context:
space:
mode:
Diffstat (limited to 'search_controller.go')
-rw-r--r--search_controller.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/search_controller.go b/search_controller.go
index 723cd93..5ed762a 100644
--- a/search_controller.go
+++ b/search_controller.go
@@ -76,6 +76,10 @@ func NewSearchController(storage Storage) *SearchController {
log.WithError(err).Panic("failed to retrieve performed searches")
}
+ if searches == nil {
+ searches = []PerformedSearch{}
+ }
+
return &SearchController{
storage: storage,
performedSearches: searches,