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}
|
onLoadMore={getMore}
|
||||||
>
|
>
|
||||||
{(!viewportIds || !viewportIds.length || viewportIds.includes(chatIds[0])) && (
|
{(!viewportIds || !viewportIds.length || viewportIds.includes(chatIds[0])) && (
|
||||||
<>
|
<div key="header">
|
||||||
<h4 key="header1" className="settings-item-header" dir={lang.isRtl ? 'rtl' : undefined}>
|
<h4 className="settings-item-header" dir={lang.isRtl ? 'rtl' : undefined}>
|
||||||
{lang('FilterChatTypes')}
|
{lang('FilterChatTypes')}
|
||||||
</h4>
|
</h4>
|
||||||
{chatTypes.map(renderChatType)}
|
{chatTypes.map(renderChatType)}
|
||||||
<div key="divider" className="picker-list-divider" />
|
<div className="picker-list-divider" />
|
||||||
<h4 key="header2" className="settings-item-header" dir={lang.isRtl ? 'rtl' : undefined}>
|
<h4 className="settings-item-header" dir={lang.isRtl ? 'rtl' : undefined}>
|
||||||
{lang('FilterChats')}
|
{lang('FilterChats')}
|
||||||
</h4>
|
</h4>
|
||||||
</>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{viewportIds?.length ? (
|
{viewportIds?.length ? (
|
||||||
|
|||||||
@ -409,7 +409,7 @@ function renderChildren(
|
|||||||
function renderFastListChildren($current: VirtualElementParent, $new: VirtualElementParent, currentEl: HTMLElement) {
|
function renderFastListChildren($current: VirtualElementParent, $new: VirtualElementParent, currentEl: HTMLElement) {
|
||||||
const newKeys = new Set(
|
const newKeys = new Set(
|
||||||
$new.children.map(($newChild) => {
|
$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)) {
|
if (DEBUG && isParentElement($newChild)) {
|
||||||
// eslint-disable-next-line no-null/no-null
|
// eslint-disable-next-line no-null/no-null
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user