From 4714a961b87746b0f85214c756614d276666f285 Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Fri, 25 Jun 2021 12:11:56 +0200 Subject: [PATCH] fix(Webhook): resolve non-string avatars too (#5914) --- src/structures/Webhook.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 3f2db5cac..2d79537e5 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -232,7 +232,7 @@ class Webhook { * @returns {Promise} */ async edit({ name = this.name, avatar, channel }, reason) { - if (avatar && typeof avatar === 'string' && !avatar.startsWith('data:')) { + if (avatar && !(typeof avatar === 'string' && avatar.startsWith('data:'))) { avatar = await DataResolver.resolveImage(avatar); } if (channel) channel = channel instanceof Channel ? channel.id : channel;