diff --git a/ts/components/ConversationListItem.md b/ts/components/ConversationListItem.md index 67cc729b9..996042c45 100644 --- a/ts/components/ConversationListItem.md +++ b/ts/components/ConversationListItem.md @@ -184,3 +184,28 @@ We only show one line. /> ``` + +#### Missing data + +```jsx +
+ console.log('onClick')} + i18n={util.i18n} + /> + console.log('onClick')} + i18n={util.i18n} + /> +
+``` diff --git a/ts/components/conversation/Timestamp.tsx b/ts/components/conversation/Timestamp.tsx index 5d75721f6..1d66760b4 100644 --- a/ts/components/conversation/Timestamp.tsx +++ b/ts/components/conversation/Timestamp.tsx @@ -7,7 +7,7 @@ import { formatRelativeTime } from '../../util/formatRelativeTime'; import { Localizer } from '../../types/Util'; interface Props { - timestamp: number; + timestamp: number | null; extended: boolean; module?: string; withImageNoCaption?: boolean; @@ -52,6 +52,10 @@ export class Timestamp extends React.Component { } = this.props; const moduleName = module || 'module-timestamp'; + if (timestamp === null || timestamp === undefined) { + return null; + } + return (