From 762e0111fb188dbe39988943a0cdc231c6677560 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 30 Sep 2019 16:00:58 +0100 Subject: [PATCH] Add trace as well --- src/Avatar.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Avatar.js b/src/Avatar.js index 23e5fab9fb..17860698cb 100644 --- a/src/Avatar.js +++ b/src/Avatar.js @@ -67,7 +67,12 @@ module.exports = { * @return {string} the first letter */ getInitialLetter(name) { - if (!name || name.length < 1) { + if (!name) { + // XXX: We should find out what causes the name to sometimes be falsy. + console.trace("`name` argument to `getInitialLetter` not supplied"); + return undefined; + } + if (name.length < 1) { return undefined; }