Page MenuHomePhabricator

D7842.id.diff
No OneTemporary

D7842.id.diff

diff --git a/lib/utils/message-ops-utils.js b/lib/utils/message-ops-utils.js
--- a/lib/utils/message-ops-utils.js
+++ b/lib/utils/message-ops-utils.js
@@ -107,7 +107,10 @@
translateClientDBMediaInfoToImage,
);
}
- if (!clientDBMessageInfo.media_infos) {
+ if (
+ !clientDBMessageInfo.media_infos ||
+ clientDBMessageInfo.media_infos.length === 0
+ ) {
return [];
}
const mediaInfos: $ReadOnlyArray<ClientDBMediaInfo> =
@@ -319,7 +322,7 @@
const { media_infos } = clientDBMessageInfo;
let pinnedContent;
- if (!media_infos) {
+ if (!media_infos || media_infos.length === 0) {
pinnedContent = 'a message';
} else {
const media = translateClientDBMediaInfosToMedia(clientDBMessageInfo);

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 4, 10:54 PM (11 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2615055
Default Alt Text
D7842.id.diff (743 B)

Event Timeline