mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix Cannot read 'Post' of undefined
This commit is contained in:
parent
4293fb845b
commit
1a852ebfab
@ -160,10 +160,11 @@ export default {
|
||||
$state.complete()
|
||||
}
|
||||
|
||||
const { Post = [] } = previousResult
|
||||
const result = {
|
||||
...previousResult,
|
||||
Post: [
|
||||
...previousResult.Post.filter(prevPost => {
|
||||
...Post.filter(prevPost => {
|
||||
return (
|
||||
fetchMoreResult.Post.filter(newPost => newPost.id === prevPost.id).length === 0
|
||||
)
|
||||
|
||||
@ -394,10 +394,11 @@ export default {
|
||||
this.hasMore = false
|
||||
$state.complete()
|
||||
}
|
||||
const { profilePagePosts = [] } = previousResult
|
||||
const result = {
|
||||
...previousResult,
|
||||
profilePagePosts: [
|
||||
...previousResult.profilePagePosts.filter(prevPost => {
|
||||
...profilePagePosts.filter(prevPost => {
|
||||
return (
|
||||
fetchMoreResult.profilePagePosts.filter(newPost => newPost.id === prevPost.id)
|
||||
.length === 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user