Skip to content

Commit

Permalink
Use boolean parsing and fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pubudu-ranasinghe committed May 25, 2023
1 parent 4d4d79a commit a4f096e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ const propTypes = {

const EditedRenderer = (props) => {
const defaultRendererProps = _.omit(props, ['TDefaultRenderer', 'style', 'tnode']);
const isPendingDelete = !!props.tnode.attributes.deleted;

const isPendingDelete = Boolean(props.tnode.attributes.deleted !== undefined);
return (
<Text
// eslint-disable-next-line react/jsx-props-no-spreading
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionItemFragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const ReportActionItemFragment = (props) => {
// Only render HTML if we have html in the fragment
if (!differByLineBreaksOnly) {
const isPendingDelete = props.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && props.network.isOffline;
const editedTag = props.fragment.isEdited ? `<edited ${isPendingDelete ? 'deleted="true"' : ''}></edited>` : '';
const editedTag = props.fragment.isEdited ? `<edited ${isPendingDelete ? 'deleted' : ''}></edited>` : '';
const htmlContent = applyStrikethrough(html + editedTag, isPendingDelete);

return <RenderHTML html={props.source === 'email' ? `<email-comment>${htmlContent}</email-comment>` : `<comment>${htmlContent}</comment>`} />;
Expand Down

0 comments on commit a4f096e

Please sign in to comment.