Skip to content

Commit

Permalink
Fixed dateRanges when importing from wikitree (PeWu#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
czifumasa authored Apr 25, 2022
1 parent fecfe67 commit 359d07e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/datasource/wikitree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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: '',
Expand Down

0 comments on commit 359d07e

Please sign in to comment.