Skip to content

Commit

Permalink
Estimate birth year based on record metadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
ranbo committed Dec 2, 2023
1 parent 39f6ccd commit f57035e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gx-fix.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function getRecordYear(gx) {
// Check record coverage for date
if (!year && gx.sourceDescriptions) {
for (let sd of gx.sourceDescriptions) {
if (sd.type === "http://gedcomx.org/Record" && sd.coverage) {
if (sd.resourceType === "http://gedcomx.org/Record" && sd.coverage) {
for (let coverage of sd.coverage) {
if (coverage.temporal) {
year = parseYearFromDateString(coverage.temporal.original)
Expand Down

0 comments on commit f57035e

Please sign in to comment.