prepend user avatar url by base url if it starts from api base
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { h, Component } from 'preact';
|
||||
|
||||
import api from 'common/api';
|
||||
import { API_BASE, BASE_URL } from 'common/constants';
|
||||
import { url } from 'common/settings';
|
||||
import store from 'common/store';
|
||||
|
||||
@@ -155,6 +156,10 @@ export default class Comment extends Component {
|
||||
value: Math.abs(score),
|
||||
sign: score > 0 ? '+' : (score < 0 ? '−' : ''),
|
||||
},
|
||||
user: {
|
||||
...data.user,
|
||||
picture: data.user.picture.indexOf(API_BASE) === 0 ? `${BASE_URL}${data.user.picture}` : data.user.picture,
|
||||
},
|
||||
};
|
||||
|
||||
const defaultMods = {
|
||||
|
||||
Reference in New Issue
Block a user