Fix building author pages for authors with no posts

This commit is contained in:
ponas committed 2019-01-18 00:26:38 +01:00
1 parent b612c53b28
commit ce4835aad6
1 file changed
+1 -1
+1 -1
View File
@@ -15,7 +15,7 @@ const Author = props => {
// The `authored_wordpress__POST` returns a simple array instead of an array
// of edges / nodes. We therefore need to convert the array here.
const posts = authored_wordpress__POST.map(post => ({
const posts = (totalCount === 0) ? [] : authored_wordpress__POST.map(post => ({
node: post,
}))