wikitree-dynamic-tree icon indicating copy to clipboard operation
wikitree-dynamic-tree copied to clipboard

Timeline View throws error if starting person does not have a birth date.

Open jmegenealogy opened this issue 9 months ago • 4 comments

When the starting person does not have a birthdate, the following error is thrown:

TimelineView.js:243 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split')

jmegenealogy avatar Feb 09 '25 17:02 jmegenealogy

I had a quick look but couldn't reproduce it on https://www.wikitree.com/apps/Gill-6800#name=Gill-6800&view=timeline

faceless2 avatar Feb 09 '25 18:02 faceless2

It could be that my profile has no dates at all which is causing the problem.

jmegenealogy avatar Feb 09 '25 19:02 jmegenealogy

Hmm, https://www.wikitree.com/apps/Gill-1767#name=Gill-1767&view=timeline also looks OK here. Tried a few others too, although all of them had at least one descendant with at least one birth/death date. Maybe you need a profile with no dates on the person or any of their descendants? I don't know of any to test this.

faceless2 avatar Feb 10 '25 17:02 faceless2

I was able to replicate the issue using Jamie’s profile. The code expects at least a birth year.

I can add logic to handle a null value, but I’ll need to figure out how to place a marker on the timeline without any date to determine its position 🤔

harrislineage avatar Apr 10 '25 20:04 harrislineage