Settings / Folders: Fix exception in Chat Picker

This commit is contained in:
Alexander Zinchuk 2022-09-21 00:14:47 +02:00
parent 9c1a016cbe
commit 2ad7bd03a2
2 changed files with 6 additions and 6 deletions

View File

@ -197,16 +197,16 @@ const SettingsFoldersChatsPicker: FC<OwnProps & StateProps> = ({
onLoadMore={getMore}
>
{(!viewportIds || !viewportIds.length || viewportIds.includes(chatIds[0])) && (
<>
<h4 key="header1" className="settings-item-header" dir={lang.isRtl ? 'rtl' : undefined}>
<div key="header">
<h4 className="settings-item-header" dir={lang.isRtl ? 'rtl' : undefined}>
{lang('FilterChatTypes')}
</h4>
{chatTypes.map(renderChatType)}
<div key="divider" className="picker-list-divider" />
<h4 key="header2" className="settings-item-header" dir={lang.isRtl ? 'rtl' : undefined}>
<div className="picker-list-divider" />
<h4 className="settings-item-header" dir={lang.isRtl ? 'rtl' : undefined}>
{lang('FilterChats')}
</h4>
</>
</div>
)}
{viewportIds?.length ? (

View File

@ -409,7 +409,7 @@ function renderChildren(
function renderFastListChildren($current: VirtualElementParent, $new: VirtualElementParent, currentEl: HTMLElement) {
const newKeys = new Set(
$new.children.map(($newChild) => {
const key = 'props' in $newChild && $newChild.props.key;
const key = 'props' in $newChild ? $newChild.props.key : undefined;
if (DEBUG && isParentElement($newChild)) {
// eslint-disable-next-line no-null/no-null