summaryrefslogtreecommitdiffstats
path: root/src/store
diff options
context:
space:
mode:
authorJonas Sulzer <jonas@violoncello.ch>2019-05-29 23:58:16 +0200
committerJonas Sulzer <jonas@violoncello.ch>2019-05-29 23:58:16 +0200
commitd7baae9735bcc8f97a330447ab0d2321ba3ddf67 (patch)
tree0fef06e0adbad4902e3b771ae94d651e57f66574 /src/store
parentc5f9828788769b7ad795fc1bed9554a9388b06da (diff)
🐛 FIX: eslint && normal boost (parentAnnounce check)
Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
Diffstat (limited to 'src/store')
-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 b532ab86..accf5a7b 100644
--- a/src/store/timeline.js
+++ b/src/store/timeline.js
@@ -55,18 +55,18 @@ const mutations = {
state.account = account
},
boostPost(state, { post, parentAnnounce }) {
- if (!typeof state.timeline[post.id] === 'undefined') {
+ if (typeof state.timeline[post.id] !== 'undefined') {
Vue.set(state.timeline[post.id].action.values, 'boosted', true)
}
- if (parentAnnounce) {
+ if (typeof parentAnnounce.id !== 'undefined') {
Vue.set(state.timeline[parentAnnounce.id].cache[parentAnnounce.object].object.action.values, 'boosted', true)
}
},
unboostPost(state, { post, parentAnnounce }) {
- if (!typeof state.timeline[post.id] === 'undefined') {
+ if (typeof state.timeline[post.id] !== 'undefined') {
Vue.set(state.timeline[post.id].action.values, 'boosted', false)
}
- if (parentAnnounce) {
+ if (typeof parentAnnounce.id !== 'undefined') {
Vue.set(state.timeline[parentAnnounce.id].cache[parentAnnounce.object].object.action.values, 'boosted', false)
}
}