Skip to content

Commit

Permalink
check that survey tags can be parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght committed Dec 28, 2023
1 parent b98475c commit 746ab40
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/lib/map/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,15 +626,18 @@ export const verifiedArr = (element: ElementOSM) => {
const verified = [];

if (element.tags) {
if (element.tags['survey:date']) {
if (element.tags['survey:date'] && Date.parse(element.tags['survey:date'])) {
verified.push(element.tags['survey:date']);
}

if (element.tags['check_date']) {
if (element.tags['check_date'] && Date.parse(element.tags['check_date'])) {
verified.push(element.tags['check_date']);
}

if (element.tags['check_date:currency:XBT']) {
if (
element.tags['check_date:currency:XBT'] &&
Date.parse(element.tags['check_date:currency:XBT'])
) {
verified.push(element.tags['check_date:currency:XBT']);
}

Expand Down

0 comments on commit 746ab40

Please sign in to comment.