Skip to content

Commit

Permalink
feat(cli): Allow bundle to guess the imagery ID from the url with sla…
Browse files Browse the repository at this point in the history
…sh ending. (#2976)

#### Motivation
We are trying to add slash at the end of all the urls in the
basemaps-configs.
linz/basemaps-config#809

#### Modification

This will fix the bundle to find the correct imagery id from the both
new and old url.

#### Checklist

_If not applicable, provide explanation of why._

- [ ] Tests updated
- [ ] Docs updated
- [ ] Issue linked in Title

---------

Co-authored-by: Blayne Chard <[email protected]>
  • Loading branch information
Wentao-Kuang and blacha authored Oct 10, 2023
1 parent 21d8193 commit 92fb6dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/config/src/json/json.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Q = PLimit(10);

export function guessIdFromUri(uri: string): string | null {
const parts = uri.split('/');
const 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 92fb6dd

Please sign in to comment.