Skip to content

Commit fe40941

Browse files
committed
sheets view check
1 parent 859467d commit fe40941

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/templates/blog-post.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ class BlogPostTemplate extends React.Component {
2121
render() {
2222
const post = this.props.data.mdx
2323
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-
}
24+
const views = (this.props.data.sheetViews && this.props.data.sheetViews.count) ? this.props.data.sheetViews.count : 0;
2825
// const comments = this.props.data.allStackCheatsComments.edges
2926

3027
return (

0 commit comments

Comments
 (0)