diff --git a/src/templates/author.js b/src/templates/author.js index 75d66d2..d98afd5 100644 --- a/src/templates/author.js +++ b/src/templates/author.js @@ -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, }))