We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 01031e3 + cc43de6 commit 4f52afdCopy full SHA for 4f52afd
src/Avatar.js
@@ -82,6 +82,7 @@ function urlForColor(color) {
82
const colorToDataURLCache = new Map();
83
84
export function defaultAvatarUrlForString(s) {
85
+ if (!s) return ""; // XXX: should never happen but empirically does by evidence of a rageshake
86
const defaultColors = ['#0DBD8B', '#368bd6', '#ac3ba8'];
87
let total = 0;
88
for (let i = 0; i < s.length; ++i) {
0 commit comments