Skip to content

Commit

Permalink
fix(Webhook): resolve non-string avatars too (#5914)
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceEEC committed Jun 25, 2021
1 parent 2616125 commit 4714a96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/structures/Webhook.js
Expand Up @@ -232,7 +232,7 @@ class Webhook {
* @returns {Promise<Webhook>}
*/
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;
Expand Down

0 comments on commit 4714a96

Please sign in to comment.