diff options
author | Jonas Sulzer <jonas@violoncello.ch> | 2019-05-29 23:58:16 +0200 |
---|---|---|
committer | Jonas Sulzer <jonas@violoncello.ch> | 2019-05-29 23:58:16 +0200 |
commit | d7baae9735bcc8f97a330447ab0d2321ba3ddf67 (patch) | |
tree | 0fef06e0adbad4902e3b771ae94d651e57f66574 | |
parent | c5f9828788769b7ad795fc1bed9554a9388b06da (diff) |
🐛 FIX: eslint && normal boost (parentAnnounce check)
Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
-rw-r--r-- | src/components/TimelineEntry.vue | 2 | ||||
-rw-r--r-- | src/store/timeline.js | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/components/TimelineEntry.vue b/src/components/TimelineEntry.vue index b5862b30..e635ccd5 100644 --- a/src/components/TimelineEntry.vue +++ b/src/components/TimelineEntry.vue @@ -1,7 +1,7 @@ <template> <div class="timeline-entry"> <div v-if="item.type === 'Announce'" class="boost"> - <span class="icon-boost"></span> + <span class="icon-boost" /> <router-link v-if="item.actor_info" :to="{ name: 'profile', params: { account: item.local ? item.actor_info.preferredUsername : item.actor_info.account }}"> <span v-tooltip.bottom="item.actor_info.account" class="post-author"> {{ userDisplayName(item.actor_info) }} 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) } } |