fix condition for comment.orig in comment component
This commit is contained in:
@@ -286,12 +286,16 @@ export default class Comment extends Component {
|
||||
)
|
||||
),
|
||||
time: formatTime(new Date(data.time)),
|
||||
orig: isEditing && data.orig && data.orig
|
||||
.replace(/&[#A-Za-z0-9]+;/gi, entity => {
|
||||
const span = document.createElement('span');
|
||||
span.innerHTML = entity;
|
||||
return span.innerText;
|
||||
}),
|
||||
orig: isEditing
|
||||
? (
|
||||
data.orig && data.orig
|
||||
.replace(/&[#A-Za-z0-9]+;/gi, entity => {
|
||||
const span = document.createElement('span');
|
||||
span.innerHTML = entity;
|
||||
return span.innerText;
|
||||
})
|
||||
)
|
||||
: data.orig,
|
||||
score: {
|
||||
value: Math.abs(score),
|
||||
sign: score > 0 ? '+' : (score < 0 ? '−' : null),
|
||||
|
||||
Reference in New Issue
Block a user