Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] add ternary operator #119

Merged
merged 2 commits into from
Jan 10, 2022
Merged

Conversation

Ponchimeow
Copy link
Contributor

No description provided.

@Ponchimeow
Copy link
Contributor Author

@Ponchimeow Ponchimeow requested a review from emily40830 January 7, 2022 05:10
@Ponchimeow
Copy link
Contributor Author

perv is undefined when using updateQuery in fetchMore

member_note: [...prev.member_note, ...fetchMoreResult.member_note],
member_note: [...(prev ? prev.member_note : []), ...fetchMoreResult.member_note],
Copy link
Contributor

@emily40830 emily40830 Jan 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NITS: may modify the prev
ex:

let newPrev = prev ? prev.member_note : []

return {
   ...prev,
   // do something ....
  member_note: [...newPrev, ...fetchMoreResult.member_note]
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Contributor

@emily40830 emily40830 Jan 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this is what I mean.
I modify the comment.

@Ponchimeow
Copy link
Contributor Author

Ponchimeow commented Jan 7, 2022

@emily40830 emily40830 merged commit 3b8411d into develop Jan 10, 2022
@Ponchimeow Ponchimeow deleted the bugfix/member_note-fetchMore branch January 20, 2022 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants