File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed
Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ class App extends Component {
2020 }
2121
2222 fetchHotPosts ( ) {
23+ window . scrollTo ( 0 , 0 )
2324 let _this = this ;
2425 this . setState ( { isLoading : true } ) ;
2526 axios . get ( `${ baseURL } /ajax/posts/hot` )
@@ -33,6 +34,7 @@ class App extends Component {
3334 }
3435
3536 fetchTrendingPosts ( ) {
37+ window . scrollTo ( 0 , 0 )
3638 let _this = this ;
3739 this . setState ( { isLoading : true } ) ;
3840 axios . get ( `${ baseURL } /ajax/posts/stories/trending` )
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ export class PostCard extends Component {
1919 }
2020
2121 loadProfileImage ( src ) {
22+ if ( ! src ) {
23+ return ;
24+ }
2225 if ( src . indexOf ( '//res.cloudinary.com' ) !== - 1 && src . indexOf ( '/upload/' ) !== - 1 ) {
2326 return this . getReplacedImage ( src ) ;
2427 }
@@ -41,7 +44,7 @@ export class PostCard extends Component {
4144 </ a >
4245 < div className = "post-footer" >
4346 < a href = { `${ post . author ? 'https://hashnode.com/@' + post . author . username + '?utm_source=chrome_extension&utm_medium=extension' : '' } ` } target = "_blank" className = "author" >
44- < img src = { ( ( post . author && this . loadProfileImage ( post . author . photo ) ) || dummyUserImage ) } />
47+ < img src = { ( ( post . author && post . author . photo && this . loadProfileImage ( post . author . photo ) ) || dummyUserImage ) } />
4548 </ a >
4649 < div className = "post-activity" >
4750 < a href = { `https://hashnode.com/post/${ post . slug } -${ post . cuid } ?utm_source=chrome_extension&utm_medium=extension` } target = "_blank" className = "reactions" >
Original file line number Diff line number Diff line change 11{
22 "name" : " Hashnode — The Dev Community" ,
33 "manifest_version" : 2 ,
4- "version" : " 0.0.3 " ,
4+ "version" : " 0.0.4 " ,
55 "description" : " Hashnode Chrome Extension to read hot discussions and stories. Stay up-to-date with what's happening in the developer's community." ,
66 "permissions" : [],
77 "background" : {},
1414 },
1515 "author" : " Hashnode" ,
1616 "homepage_url" : " https://hashnode.com" ,
17- "default_icon" : {
18- "16" : " images/hn-logo-16.png" ,
19- "32" : " images/hn-logo-32.png" ,
20- "48" : " images/hn-logo-48.png" ,
21- "128" : " images/hn-logo-128.png"
22- },
2317 "icons" : {
2418 "16" : " images/hn-logo-16.png" ,
2519 "32" : " images/hn-logo-32.png" ,
You can’t perform that action at this time.
0 commit comments