Skip to content

Commit 5f14e60

Browse files
committed
fix: add null coleasing operator
1 parent 5402f32 commit 5f14e60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

package/src/components/Message/MessageSimple/MessageContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ const MessageContentWithContext = <
214214

215215
const isMessageReceivedOrErrorType = !isMyMessage || error;
216216

217-
let backgroundColor = senderMessageBackgroundColor || light_gray;
217+
let backgroundColor = senderMessageBackgroundColor ?? light_gray;
218218
if (onlyEmojis && !message.quoted_message) {
219219
backgroundColor = transparent;
220220
} else if (otherAttachments.length) {
@@ -224,7 +224,7 @@ const MessageContentWithContext = <
224224
backgroundColor = blue_alice;
225225
}
226226
} else if (isMessageReceivedOrErrorType) {
227-
backgroundColor = receiverMessageBackgroundColor || white_snow;
227+
backgroundColor = receiverMessageBackgroundColor ?? white_snow;
228228
}
229229

230230
const repliesCurveColor = !isMessageReceivedOrErrorType ? backgroundColor : light_gray;

0 commit comments

Comments
 (0)