Skip to content

Commit

Permalink
style(util): remove linter exception
Browse files Browse the repository at this point in the history
  • Loading branch information
kellnerd authored and ROpdebee committed Jan 27, 2022
1 parent 5786c75 commit 40675ed
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/util/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ export function urlBasename(url: string | URL, defaultBasename = ''): string {
if (typeof url !== 'string') url = url.pathname;
// We don't need nullish coalescing here, since the array will always have
// at least one element, but the last element may be the empty string.
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
return url.split('/').pop() || defaultBasename;
return url.split('/').pop()! || defaultBasename;
}

export function urlJoin(base: string | URL, ...subPaths: string[]): URL {
Expand Down

0 comments on commit 40675ed

Please sign in to comment.