refactor: split in multiple lines rather than one liner

merge-requests/3358/head
P. Reis 2025-03-24 11:25:17 -03:00
rodzic 1e39f56c3f
commit 02182643fd
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -19,8 +19,11 @@ const makeMapStateToProps = () => {
const statusId = state.compose.get(composeId)?.in_reply_to!;
const editing = !!state.compose.get(composeId)?.id;
const legacyStatus = getStatus(state, { id: statusId }) as LegacyStatus;
const statusEntity = selectEntity<StatusEntity>(state, Entities.STATUSES, statusId);
return {
status: ((getStatus(state, { id: statusId }) as LegacyStatus)?.toJS() ?? selectEntity<StatusEntity>(state, Entities.STATUSES, statusId)) as StatusEntity,
status: (legacyStatus?.toJS() ?? statusEntity) as StatusEntity,
hideActions: editing,
};
};