Skip to content

Commit

Permalink
fix: fix removing wrong posts
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Jun 8, 2021
1 parent 0ba2ef7 commit d95cfe7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions store/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,13 @@ export const actions = {

// Remove post with the same ID
const FILTERED_SAVED_POSTS = SAVED_POSTS.filter((SAVED_POST) => {
return (
// Post ID
SAVED_POST.data.id !== post.id &&
return !(
// Post Domain
SAVED_POST.meta_data.booru_domain !== domain
(
SAVED_POST.meta_data.booru_domain === domain &&
// Post ID
SAVED_POST.data.id === post.id
)
)
})

Expand Down

0 comments on commit d95cfe7

Please sign in to comment.