diff --git a/scm-ui/ui-components/src/repos/diffs.ts b/scm-ui/ui-components/src/repos/diffs.ts index 029803a0a4..0f39f3a4dc 100644 --- a/scm-ui/ui-components/src/repos/diffs.ts +++ b/scm-ui/ui-components/src/repos/diffs.ts @@ -41,5 +41,5 @@ export function createHunkIdentifierFromContext(ctx: BaseContext) { } export function escapeWhitespace(path: string) { - return path.toLowerCase().replace(/\W/g, "-"); + return path?.toLowerCase().replace(/\W/g, "-"); }