Skip to content

Commit

Permalink
Allow bundle to guessId from the url with slash ending.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentao-Kuang committed Oct 10, 2023
1 parent 21d8193 commit 54ac150
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/config/src/json/json.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ const Q = PLimit(10);

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

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

0 comments on commit 54ac150

Please sign in to comment.