From 6061075525155e5ab0d31b168c100fc12ce0a199 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Thu, 8 Apr 2021 15:14:09 +0300 Subject: [PATCH] add third letter to hotbar icon Signed-off-by: Jari Kolehmainen --- src/renderer/components/hotbar/hotbar-icon.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/hotbar/hotbar-icon.tsx b/src/renderer/components/hotbar/hotbar-icon.tsx index 6bb2d2ae56..201bc2df02 100644 --- a/src/renderer/components/hotbar/hotbar-icon.tsx +++ b/src/renderer/components/hotbar/hotbar-icon.tsx @@ -48,8 +48,10 @@ export class HotbarIcon extends React.Component { if (splittedName.length === 1) { return splittedName[0].substring(0, 2); - } else { + } else if (splittedName.length === 2) { return splittedName[0].substring(0, 1) + splittedName[1].substring(0, 1); + } else { + return splittedName[0].substring(0, 1) + splittedName[1].substring(0, 1) + splittedName[2].substring(0, 1); } }