Skip to content

Commit

Permalink
modified filename extraction method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Meriem-BenIsmail committed Nov 19, 2024
1 parent 87dc382 commit c40bd3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/docprovider/src/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const TimelineSliderComponent: React.FC<Props> = ({
const parsedURL = new URL(url);
const pathname = parsedURL.pathname;

const apiIndex = pathname.indexOf(DOCUMENT_TIMELINE_URL);
const apiIndex = pathname.lastIndexOf(DOCUMENT_TIMELINE_URL);
if (apiIndex === -1) {
throw new Error(
`API segment "${DOCUMENT_TIMELINE_URL}" not found in URL.`
Expand Down

0 comments on commit c40bd3a

Please sign in to comment.