Settings / Folders: Fix exception in Chat Picker
This commit is contained in:
parent
9c1a016cbe
commit
2ad7bd03a2
@ -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 ? (
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user