nicolium: fix hasDescendants
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@@ -243,7 +243,7 @@ const Thread = ({
|
|||||||
|
|
||||||
const renderChildren = (list: Array<string>) =>
|
const renderChildren = (list: Array<string>) =>
|
||||||
list.map((id) => {
|
list.map((id) => {
|
||||||
if (id === status.id)
|
if (id === status.id) {
|
||||||
return (
|
return (
|
||||||
<div className={clsx({ 'pb-4': hasDescendants })} key={status.id}>
|
<div className={clsx({ 'pb-4': hasDescendants })} key={status.id}>
|
||||||
{deleted ? (
|
{deleted ? (
|
||||||
@@ -289,6 +289,7 @@ const Thread = ({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (id.endsWith('-tombstone')) {
|
if (id.endsWith('-tombstone')) {
|
||||||
return renderTombstone(id);
|
return renderTombstone(id);
|
||||||
@@ -328,7 +329,7 @@ const Thread = ({
|
|||||||
[status.id],
|
[status.id],
|
||||||
);
|
);
|
||||||
|
|
||||||
const hasDescendants = thread.length > statusIndex;
|
const hasDescendants = thread.length > statusIndex + 1;
|
||||||
|
|
||||||
type HotkeyHandlers = { [key: string]: (keyEvent?: KeyboardEvent) => void };
|
type HotkeyHandlers = { [key: string]: (keyEvent?: KeyboardEvent) => void };
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user