Skip to content

Commit

Permalink
fix: add null coleasing operator
Browse files Browse the repository at this point in the history
  • Loading branch information
khushal87 committed Nov 8, 2024
1 parent 5402f32 commit 5f14e60
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ const MessageContentWithContext = <

const isMessageReceivedOrErrorType = !isMyMessage || error;

let backgroundColor = senderMessageBackgroundColor || light_gray;
let backgroundColor = senderMessageBackgroundColor ?? light_gray;
if (onlyEmojis && !message.quoted_message) {
backgroundColor = transparent;
} else if (otherAttachments.length) {
Expand All @@ -224,7 +224,7 @@ const MessageContentWithContext = <
backgroundColor = blue_alice;
}
} else if (isMessageReceivedOrErrorType) {
backgroundColor = receiverMessageBackgroundColor || white_snow;
backgroundColor = receiverMessageBackgroundColor ?? white_snow;
}

const repliesCurveColor = !isMessageReceivedOrErrorType ? backgroundColor : light_gray;
Expand Down

0 comments on commit 5f14e60

Please sign in to comment.