From a8bd2cb62aa04a78e9f57f5e3ef6dfc430d7810c Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Mon, 27 Jun 2022 01:54:01 +0200 Subject: [PATCH] Fixed single name delimiter slicing last letter off all names. --- src/app.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app.js b/src/app.js index 22cf09a..b971f41 100644 --- a/src/app.js +++ b/src/app.js @@ -33,8 +33,12 @@ async function getWekanActorNames() { const actorNames = wekanBoardRes.body.map((card) => { const name = card.title.split(/\s+/).slice(0, 2).join(' '); - // allow single name to be delimited - return name.slice(0, name.indexOf('.')); + if (name.includes('.')) { + // allow single name to be delimited + return name.slice(0, name.indexOf('.')); + } + + return name; ;}); return actorNames;