Skip to content

Commit

Permalink
refactor(parseIso8601): apply eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
djcsdy committed Jan 25, 2024
1 parent a0eebee commit 6c9dadd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export function todayLocal(): Date {
* accepted. */
export function parseIso8601(text: string): Date | null {
const match = /^([+-]?\d{4,})-?(\d{2})-?(\d{2})$/u.exec(text);
if (match == null || match[1] == null || match[2] == null || match[3] == null) {
if (match?.[1] == null || match[2] == null || match[3] == null) {
return null;
}

Expand Down

0 comments on commit 6c9dadd

Please sign in to comment.