Fixed nil deref error on no filter, fixed no results
the build was successful

This commit is contained in:
2018-08-01 14:51:45 +02:00
parent 132cf28f0f
commit c348a90b70
2 changed files with 9 additions and 4 deletions
+4 -1
View File
@@ -35,7 +35,10 @@ func (r *QueryResolver) Stories(ctx context.Context, args *StoriesArg) ([]*types
author = *filter.Author
}
category := filter.Category
category := ""
if filter != nil && filter.Category != nil {
category = *filter.Category
}
tags := make([]story.Tag, 0, 8)
if filter != nil && filter.Tags != nil {