This commit is contained in:
Travis CI 2016-12-30 17:02:17 +00:00
parent 6479565491
commit 4a8cd3dd63
2 changed files with 5 additions and 5 deletions

View file

@ -8923,7 +8923,7 @@ class ClientUser extends User {
* .catch(console.error);
*/
setAvatar(avatar) {
if (avatar.startsWith('data:')) {
if (typeof avatar === 'string' && avatar.startsWith('data:')) {
return this.client.rest.methods.updateCurrentUser({ avatar });
} else {
return this.client.resolver.resolveBuffer(avatar).then(data =>

File diff suppressed because one or more lines are too long