diff --git a/web/app/components/tools/edit-custom-collection-modal/index.tsx b/web/app/components/tools/edit-custom-collection-modal/index.tsx index 6c15e827f8..7f05e5ed8a 100644 --- a/web/app/components/tools/edit-custom-collection-modal/index.tsx +++ b/web/app/components/tools/edit-custom-collection-modal/index.tsx @@ -126,6 +126,19 @@ const EditCustomCollectionModal: FC = ({ }) } + const getPath = (url: string) => { + if (!url) + return '' + + try { + const path = new URL(url).pathname + return path || '' + } + catch (e) { + return url + } + } + return ( <> = ({ {item.operation_id} {item.summary} {item.method} - {item.server_url ? new URL(item.server_url).pathname : ''} + {getPath(item.server_url)}