Skip to content

Commit

Permalink
Update packages/config/src/json/json.config.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Blayne Chard <[email protected]>
  • Loading branch information
Wentao-Kuang and blacha authored Oct 10, 2023
1 parent 54ac150 commit 3873503
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/config/src/json/json.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ const Q = PLimit(10);

export function guessIdFromUri(uri: string): string | null {
const parts = uri.split('/');
let id = parts.pop();
if (uri.endsWith('/')) id = parts.pop();
const id = uri.endsWith('/') ? parts.at(-2) : parts.at(-1)

if (id == null) return null;
try {
Expand Down

0 comments on commit 3873503

Please sign in to comment.