-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
perv is undefined when using updateQuery in fetchMore |
src/hooks/member.ts
Outdated
member_note: [...prev.member_note, ...fetchMoreResult.member_note], | ||
member_note: [...(prev ? prev.member_note : []), ...fetchMoreResult.member_note], |
There was a problem hiding this comment.
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]
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
No description provided.