mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-09 17:36:23 +00:00
Single line return condition
This commit is contained in:
parent
8cac0dc60b
commit
16ee616027
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue