We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06ad5b6 commit 804a884Copy full SHA for 804a884
src/db/helper.ts
@@ -6,7 +6,7 @@ export const toClass = function (obj: any, proto: any) {
6
7
export const trimTrailingDotGit = (str: string): string => {
8
const target = '.git';
9
- if (str.endsWith(target)) {
+ if (str && str.endsWith(target)) {
10
// extract string from 0 to the end minus the length of target
11
return str.slice(0, -target.length);
12
}
0 commit comments