wikitree-dynamic-tree
wikitree-dynamic-tree copied to clipboard
Timeline View throws error if starting person does not have a birth date.
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')
I had a quick look but couldn't reproduce it on https://www.wikitree.com/apps/Gill-6800#name=Gill-6800&view=timeline
It could be that my profile has no dates at all which is causing the problem.
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.
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 🤔