diff --git a/packages/config/src/json/json.config.ts b/packages/config/src/json/json.config.ts index f7d58255e..ebe279be8 100644 --- a/packages/config/src/json/json.config.ts +++ b/packages/config/src/json/json.config.ts @@ -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 {