mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Merge pull request #2481 from Human-Connection/fix_cannot_read_post_of_undefined
Fix `Cannot read 'Post' of undefined`
This commit is contained in:
commit
032242ac7c
@ -157,10 +157,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
|
||||
)
|
||||
|
||||
@ -390,10 +390,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