Fixed bug where 'removed too quickly to be archived' text would not show up

This commit is contained in:
JubbeArt 2018-08-09 04:59:23 +02:00
parent c471aa40a5
commit f157217a6a
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
{
"name": "removeddit",
"version": "1.1.4",
"version": "1.1.5",
"description": "View removed comments from reddit",
"main": "src/index.js",
"repository": {

View file

@ -1,6 +1,6 @@
import React from 'react'
import { Link } from 'react-router-dom'
import { prettyScore, prettyDate, parse } from '../../utils'
import { prettyScore, prettyDate, parse, isRemoved } from '../../utils'
const Comment = (props) => {
let commentStyle = 'comment '
@ -13,7 +13,7 @@ const Comment = (props) => {
commentStyle += props.depth % 2 === 0 ? 'comment-even' : 'comment-odd'
}
const innerHTML = (props.body === '[removed]' && props.removed) ? '<p>[removed too quickly to be archived]</p>' : parse(props.body)
const innerHTML = (isRemoved(props.body) && props.removed) ? '<p>[removed too quickly to be archived]</p>' : parse(props.body)
const permalink = `/r/${props.subreddit}/comments/${props.link_id}/_/${props.id}/`
return (