From 0637d2f7e0266e875ce0e180c2713e3dffb480e2 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 4 Aug 2026 16:02:26 +0300 Subject: [PATCH] more optional chaining + lint --- src/components/status/status.js | 4 ++-- src/components/status_action_buttons/action_button.js | 2 +- src/services/theme_data/theme_data.service.js | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/components/status/status.js b/src/components/status/status.js index 0236570cd..61a553ef6 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -320,7 +320,7 @@ const Status = { // Muted user relationship.muting || // Muted user of a reprööt - (relationshipReblog?.muting) + relationshipReblog?.muting ) }, shouldNotMute() { @@ -333,7 +333,7 @@ const Status = { // Don't mute user's posts on user timeline (except reblogs) ((!reblog && status.user.id === this.profileUserId) || // Same as above but also allow self-reblogs - (reblog?.user.id === this.profileUserId))) || + reblog?.user.id === this.profileUserId)) || // Don't mute statuses in muted conversation when said conversation is opened (this.inConversation && status.thread_muted)) && // No excuses if post has muted words diff --git a/src/components/status_action_buttons/action_button.js b/src/components/status_action_buttons/action_button.js index 2434820db..1a5b85301 100644 --- a/src/components/status_action_buttons/action_button.js +++ b/src/components/status_action_buttons/action_button.js @@ -138,7 +138,7 @@ export default { const existingReaction = this.status.emoji_reactions.find( (r) => r.name === emoji, ) - if (existingReaction && existingReaction.me) { + if (existingReaction?.me) { this.$store.dispatch('unreactWithEmoji', { id: this.status.id, emoji }) } else { this.$store.dispatch('reactWithEmoji', { id: this.status.id, emoji }) diff --git a/src/services/theme_data/theme_data.service.js b/src/services/theme_data/theme_data.service.js index 65c177f98..cdce2cf57 100644 --- a/src/services/theme_data/theme_data.service.js +++ b/src/services/theme_data/theme_data.service.js @@ -229,10 +229,7 @@ export const getLayerSlot = ( */ export const SLOT_ORDERED = topoSort( Object.entries(SLOT_INHERITANCE) - .sort( - ([, aV], [, bV]) => - ((aV?.priority) || 0) - ((bV && bV.priority) || 0), - ) + .sort(([, aV], [, bV]) => (aV?.priority || 0) - (bV?.priority || 0)) .reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {}), )