mirror of https://github.com/vector-im/riot-web
Coalesce falsy values from TextForEvent handlers
Signed-off-by: Robin Townsend <robin@robin.town>pull/21833/head
parent
8e64b73bd6
commit
6c4f0526d7
|
@ -705,5 +705,5 @@ export function textForEvent(ev: MatrixEvent): string;
|
|||
export function textForEvent(ev: MatrixEvent, allowJSX: true, showHiddenEvents?: boolean): string | JSX.Element;
|
||||
export function textForEvent(ev: MatrixEvent, allowJSX = false, showHiddenEvents?: boolean): string | JSX.Element {
|
||||
const handler = (ev.isState() ? stateHandlers : handlers)[ev.getType()];
|
||||
return handler?.(ev, allowJSX, showHiddenEvents)?.() ?? '';
|
||||
return handler?.(ev, allowJSX, showHiddenEvents)?.() || '';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue