We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfae45c commit 61e3f3fCopy full SHA for 61e3f3f
src/templates/blog-post.js
@@ -21,7 +21,10 @@ class BlogPostTemplate extends React.Component {
21
render() {
22
const post = this.props.data.mdx
23
const siteTitle = this.props.data.site.siteMetadata.title
24
- const views = this.props.data.sheetViews.count
+ const views = 0;
25
+ if (this.props.data.sheetViews && this.props.data.sheetViews.count) {
26
+ views = this.props.data.sheetViews.count
27
+ }
28
// const comments = this.props.data.allStackCheatsComments.edges
29
30
return (
0 commit comments