Fixed dateRanges when importing from wikitree (#97)

This commit is contained in:
czifumasa 2022-04-25 19:46:01 +02:00 committed by GitHub
parent fecfe67755
commit 359d07e1ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,7 @@ import {GedcomData, normalizeGedcom, TopolaData} from '../util/gedcom_util';
import {GedcomEntry} from 'parse-gedcom';
import {IntlShape} from 'react-intl';
import {TopolaError} from '../util/error';
import {isValidDateOrRange} from '../util/date_util';
/** Prefix for IDs of private individuals. */
export const PRIVATE_ID_PREFIX = '~Private';
@ -567,7 +568,7 @@ function dateOrRangeToGedcom(dateOrRange: DateOrRange): string {
function eventToGedcom(event: JsonEvent): GedcomEntry[] {
const result = [];
if (event.date) {
if (isValidDateOrRange(event)) {
result.push({
level: 2,
pointer: '',