summaryrefslogtreecommitdiffstats
path: root/src/store/timeline.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/store/timeline.js')
-rw-r--r--src/store/timeline.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/store/timeline.js b/src/store/timeline.js
index 978154b0..72c29677 100644
--- a/src/store/timeline.js
+++ b/src/store/timeline.js
@@ -144,10 +144,10 @@ const actions = {
postUnlike(context, { post, parentAnnounce }) {
return axios.delete(OC.generateUrl(`apps/social/api/v1/post/like?postId=${post.id}`)).then((response) => {
context.commit('unlikePost', { post, parentAnnounce })
- // Remove post from list if we are in the 'liked' timeline
- if (state.type === 'liked') {
- context.commit('removePost', post)
- }
+ // Remove post from list if we are in the 'liked' timeline
+ if (state.type === 'liked') {
+ context.commit('removePost', post)
+ }
}).catch((error) => {
OC.Notification.showTemporary('Failed to unlike post')
console.error('Failed to unlike post', error)