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 859467d commit fe40941Copy full SHA for fe40941
src/templates/blog-post.js
@@ -21,10 +21,7 @@ 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 = 0;
25
- if (this.props.data.sheetViews && this.props.data.sheetViews.count) {
26
- views = this.props.data.sheetViews.count
27
- }
+ const views = (this.props.data.sheetViews && this.props.data.sheetViews.count) ? this.props.data.sheetViews.count : 0;
28
// const comments = this.props.data.allStackCheatsComments.edges
29
30
return (
0 commit comments