Fixed age showing on actor tile when birth year is unknown.
This commit is contained in:
parent
db8aeb97a7
commit
1cf789d8f7
|
@ -71,8 +71,12 @@ export function curateActor(actor, context = {}) {
|
|||
name: actor.entity.name,
|
||||
},
|
||||
...Object.fromEntries(Object.entries(keyMap).map(([key, entryKey]) => [key, actor[entryKey]])),
|
||||
ageFromBirth: actor.date_of_birth && differenceInYears(Date.now(), actor.date_of_birth),
|
||||
ageThen: context.sceneDate && actor.date_of_birth && differenceInYears(context.sceneDate, actor.date_of_birth),
|
||||
ageFromBirth: actor.date_of_birth && actor.date_of_birth.getFullYear() > 1
|
||||
? differenceInYears(Date.now(), actor.date_of_birth)
|
||||
: null,
|
||||
ageThen: context.sceneDate && actor.date_of_birth && actor.date_of_birth.getFullYear() > 1
|
||||
? differenceInYears(context.sceneDate, actor.date_of_birth)
|
||||
: null,
|
||||
bust: actor.bust,
|
||||
cup: actor.cup,
|
||||
waist: actor.waist,
|
||||
|
|
Loading…
Reference in New Issue