From a3879b507ac5e10423c2e86ab371c40a8503a390 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 14 Aug 2015 10:30:47 +0100 Subject: [PATCH] Fix default avatars --- src/controllers/atoms/MemberAvatar.js | 4 ++-- src/controllers/atoms/RoomAvatar.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controllers/atoms/MemberAvatar.js b/src/controllers/atoms/MemberAvatar.js index d2f4aa45..b9970de7 100644 --- a/src/controllers/atoms/MemberAvatar.js +++ b/src/controllers/atoms/MemberAvatar.js @@ -60,11 +60,11 @@ module.exports = { onError: function(ev) { // don't tightloop if the browser can't load a data url - if (ev.target.src == this.defaultAvatarUrl()) { + if (ev.target.src == this.defaultAvatarUrl(this.props.member)) { return; } this.setState({ - imageUrl: this.defaultAvatarUrl() + imageUrl: this.defaultAvatarUrl(this.props.member) }); }, diff --git a/src/controllers/atoms/RoomAvatar.js b/src/controllers/atoms/RoomAvatar.js index 088d4694..a58d1365 100644 --- a/src/controllers/atoms/RoomAvatar.js +++ b/src/controllers/atoms/RoomAvatar.js @@ -51,11 +51,11 @@ module.exports = { onError: function(ev) { // don't tightloop if the browser can't load a data url - if (ev.target.src == this.defaultAvatarUrl()) { + if (ev.target.src == this.defaultAvatarUrl(this.props.room)) { return; } this.setState({ - imageUrl: this.defaultAvatarUrl() + imageUrl: this.defaultAvatarUrl(this.props.room) }); },