Skip to content

Commit

Permalink
fix: Use URL for STAC URL concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
l0b0 committed Feb 7, 2024
1 parent 48f5b2d commit cf7aad3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/stac-validate/stac.validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ const validRels = new Set(['child', 'item']);

export function getStacChildren(stacJson: st.StacItem | st.StacCollection | st.StacCatalog, path: string): string[] {
if (stacJson.type === 'Catalog' || stacJson.type === 'Collection') {
return stacJson.links.filter((f) => validRels.has(f.rel)).map((f) => fsa.join(f.href, path));
return stacJson.links.filter((f) => validRels.has(f.rel)).map((f) => new URL(f.href, path).href);
}
if (stacJson.type === 'Feature') {
return [];
Expand Down

0 comments on commit cf7aad3

Please sign in to comment.