Skip to content

Commit

Permalink
notification: better dereferencing
Browse files Browse the repository at this point in the history
  • Loading branch information
arthyn committed Jan 11, 2024
1 parent 1088a24 commit 814dfdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/src/nav/notifications/Notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ const NotificationContent: React.FC<NotificationContent> = ({
type,
content,
}) => {
const con = content;
const line = (content[1] || '').toString();
const mentionRe = new RegExp('mentioned');
const replyRe = new RegExp('replied');

const isMention = type === 'channel' && mentionRe.test(content[1].toString());
const isReply = type === 'channel' && replyRe.test(content[1].toString());
const isMention = type === 'channel' && mentionRe.test(line);
const isReply = type === 'channel' && replyRe.test(line);

function renderContent(c: YarnContent) {
if (typeof c === 'string') {
Expand Down

0 comments on commit 814dfdd

Please sign in to comment.