Fixed single name delimiter slicing last letter off all names.

This commit is contained in:
DebaucheryLibrarian 2022-06-27 01:54:01 +02:00
parent 039eb22ae7
commit a8bd2cb62a
1 changed files with 6 additions and 2 deletions

View File

@ -33,8 +33,12 @@ async function getWekanActorNames() {
const actorNames = wekanBoardRes.body.map((card) => { const actorNames = wekanBoardRes.body.map((card) => {
const name = card.title.split(/\s+/).slice(0, 2).join(' '); const name = card.title.split(/\s+/).slice(0, 2).join(' ');
// allow single name to be delimited if (name.includes('.')) {
return name.slice(0, name.indexOf('.')); // allow single name to be delimited
return name.slice(0, name.indexOf('.'));
}
return name;
;}); ;});
return actorNames; return actorNames;