From e431ccdad2d539fe6f6e35a836a2c83cc6308cdf Mon Sep 17 00:00:00 2001 From: Pascal Date: Mon, 2 Apr 2018 20:52:12 +0200 Subject: [PATCH] fix(GuildChannel): always return a boolean from the manageable getter Overlooked the comment pointing that out in #2439 --- src/structures/GuildChannel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index b38a8cac1..2e0ee57d0 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -547,7 +547,8 @@ class GuildChannel extends Channel { get manageable() { if (this.client.user.id === this.guild.ownerID) return true; const permissions = this.permissionsFor(this.client.user); - return permissions && permissions.has([Permissions.FLAGS.MANAGE_CHANNELS, Permissions.FLAGS.VIEW_CHANNEL]); + if (!permissions) return false; + return permissions.has([Permissions.FLAGS.MANAGE_CHANNELS, Permissions.FLAGS.VIEW_CHANNEL]); } /**