mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 00:38:49 +01:00
Fix userInitiated undefined
This commit is contained in:
parent
d3e3e47527
commit
fe78ac5fa0
1 changed files with 9 additions and 4 deletions
|
@ -304,6 +304,9 @@ function StatusPage({ id }) {
|
|||
<SubComments
|
||||
hasManyStatuses={hasManyStatuses}
|
||||
replies={replies}
|
||||
onStatusLinkClick={() => {
|
||||
userInitiated.current = true;
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{uiState === 'loading' &&
|
||||
|
@ -339,7 +342,11 @@ function StatusPage({ id }) {
|
|||
);
|
||||
}
|
||||
|
||||
function SubComments({ hasManyStatuses, replies }) {
|
||||
function SubComments({
|
||||
hasManyStatuses,
|
||||
replies,
|
||||
onStatusLinkClick = () => {},
|
||||
}) {
|
||||
// If less than or 2 replies and total number of characters of content from replies is less than 500
|
||||
let isBrief = false;
|
||||
if (replies.length <= 2) {
|
||||
|
@ -365,9 +372,7 @@ function SubComments({ hasManyStatuses, replies }) {
|
|||
<Link
|
||||
class="status-link"
|
||||
href={`#/s/${replyID}`}
|
||||
onClick={() => {
|
||||
userInitiated.current = true;
|
||||
}}
|
||||
onClick={onStatusLinkClick}
|
||||
>
|
||||
<Status statusID={replyID} withinContext size="s" />
|
||||
</Link>
|
||||
|
|
Loading…
Reference in a new issue