Skip to content

Commit

Permalink
refactor(util/ui): remove unneeded null check
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Jul 21, 2022
1 parent 1d543ec commit d48823c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions util/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ const getDateAndTimeFromCDPFileName = (
date: string
): FileNameParserResponse => {
const datePortion = date.split('-')
if (!datePortion || datePortion.find((dp) => Number.isNaN(parseInt(dp))))
return null
if (datePortion?.find((dp) => Number.isNaN(parseInt(dp)))) return null

// The last number after the last dash is the hour
const timePortion = datePortion.pop()
Expand Down

0 comments on commit d48823c

Please sign in to comment.