fix(GitHub Node): Tolerate trailing slash in file path (#15517)

This commit is contained in:
Michael Kret
2025-06-17 18:21:57 +03:00
committed by GitHub
parent c64ccf74a2
commit 2f6896cc7b
6 changed files with 93 additions and 11 deletions

View File

@@ -472,3 +472,10 @@ export function createUtmCampaignLink(nodeType: string, instanceId?: string) {
nodeType,
)}${instanceId ? '_' + instanceId : ''}`;
}
export const removeTrailingSlash = (url: string) => {
if (url.endsWith('/')) {
return url.slice(0, -1);
}
return url;
};