Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian aa36747364 0.12.2 2024-03-23 02:47:55 +01:00
DebaucheryLibrarian 2e54cad36e Only using first name for actor determination. 2024-03-23 02:47:52 +01:00
3 changed files with 8 additions and 5 deletions

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{
"name": "traxxx-web",
"version": "0.12.1",
"version": "0.12.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "0.12.1",
"version": "0.12.2",
"dependencies": {
"@brillout/json-serializer": "^0.5.8",
"@dicebear/collection": "^7.0.5",

View File

@ -70,5 +70,5 @@
"postcss-custom-media": "^10.0.2",
"postcss-nesting": "^12.0.2"
},
"version": "0.12.1"
"version": "0.12.2"
}

View File

@ -75,11 +75,14 @@ export function sortActorsByGender(actors, context = {}) {
const titleSlug = slugify(context.title);
const titleActors = titleSlug ? genderActors.sort((actorA, actorB) => {
if (titleSlug.includes(actorA.slug) && !titleSlug.includes(actorB.slug)) {
const actorASlug = actorA.slug.split('-')[0];
const actorBSlug = actorB.slug.split('-')[0];
if (titleSlug.includes(actorASlug) && !titleSlug.includes(actorBSlug)) {
return -1;
}
if (titleSlug.includes(actorB.slug) && !titleSlug.includes(actorA.slug)) {
if (titleSlug.includes(actorBSlug) && !titleSlug.includes(actorASlug)) {
return 1;
}