Skip to content

Commit

Permalink
parseWhen, parsePlatform: let when & platform fall back to plan data
Browse files Browse the repository at this point in the history
This commit adapts parseWhen & parsePlatform to the latest FPTF v2 draft.

see public-transport/friendly-public-transport-format#63
  • Loading branch information
derhuerst committed Dec 10, 2019
1 parent 632c71b commit 29c78fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion parse/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const parsePlatform = (profile, platfS, platfR, cncl = false) => {
}
}
return {
platform: prognosed,
platform: prognosed || planned,
plannedPlatform: planned
}
}
Expand Down
2 changes: 1 addition & 1 deletion parse/when.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const parseWhen = (profile, date, timeS, timeR, tzOffset, cncl = false) => {
}
}
return {
when: prognosed,
when: prognosed || planned,
plannedWhen: planned,
delay
}
Expand Down

0 comments on commit 29c78fd

Please sign in to comment.