Skip to content

Commit

Permalink
review: simplify parsePiDateTime.
Browse files Browse the repository at this point in the history
  • Loading branch information
rudieekkelenkamp committed May 6, 2024
1 parent b6d83ca commit 248c81a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/components/download/TimeSeriesFileDownloadComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,7 @@ function isFilterActionsFilter(
const baseUrl = configManager.get('VITE_FEWS_WEBSERVICES_URL')
function parsePiDateTime(dateTime: ActionsPeriodDate | undefined) {
if (!dateTime) {
return undefined
}
return `${dateTime.date}T${dateTime.time}Z`
return dateTime ? `${dateTime.date}T${dateTime.time}Z` : dateTime
}
// use startTime and endTime if set, otherwise use the options from the store, otherwise use the period form the config
Expand Down

0 comments on commit 248c81a

Please sign in to comment.