mirror of https://github.com/vector-im/riot-web
null-guard defaultAvatarUrlForString
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
7fa1214cf1
commit
af383c5a80
|
@ -82,6 +82,7 @@ function urlForColor(color) {
|
|||
const colorToDataURLCache = new Map();
|
||||
|
||||
export function defaultAvatarUrlForString(s) {
|
||||
if (!s) return "";
|
||||
const defaultColors = ['#0DBD8B', '#368bd6', '#ac3ba8'];
|
||||
let total = 0;
|
||||
for (let i = 0; i < s.length; ++i) {
|
||||
|
|
Loading…
Reference in New Issue