Fix building author pages for authors with no posts
This commit is contained in:
1 parent
b612c53b28
commit
ce4835aad6
1 file changed
+1
-1
@@ -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,
|
||||
}))
|
||||
|
||||
|
||||
Reference in new issue
Block a user