From 16ee61602709ae9f8474fc8712343ef563167d9b Mon Sep 17 00:00:00 2001 From: jamesbt365 Date: Fri, 4 Oct 2024 13:11:50 +0100 Subject: [PATCH] Single line return condition --- src/plugins/unsuppressEmbeds/index.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plugins/unsuppressEmbeds/index.tsx b/src/plugins/unsuppressEmbeds/index.tsx index 280a4f8d0..add09500b 100644 --- a/src/plugins/unsuppressEmbeds/index.tsx +++ b/src/plugins/unsuppressEmbeds/index.tsx @@ -36,9 +36,7 @@ const messageContextMenuPatch: NavContextMenuPatchCallback = (children, { channe (snapshot: Snapshot) => snapshot?.message.embeds.length ); - if (!isEmbedSuppressed && !embeds.length && !hasEmbedsInSnapshots) { - return; - } + if (!isEmbedSuppressed && !embeds.length && !hasEmbedsInSnapshots) return; const hasEmbedPerms = channel.isPrivate() || !!(PermissionStore.getChannelPermissions({ id: channel.id }) & PermissionsBits.EMBED_LINKS); if (author.id === UserStore.getCurrentUser().id && !hasEmbedPerms) return;