aboutsummaryrefslogtreecommitdiff
path: root/packages/server/src/git/repository.ts
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-07-29 17:10:54 +0200
committerHampusM <hampus@hampusmat.com>2021-07-29 17:10:54 +0200
commit93a4a8bf924588cd866714b86ec8f16f8d51dec0 (patch)
treea86d3ecba5838fac11042e8ae257dfe1bd3840cb /packages/server/src/git/repository.ts
parent9d6d2ce8cf34af6e787dae901ee3e5914c4c0fa4 (diff)
Organized tsconfigs, fixed tests and improved some backend functions
Diffstat (limited to 'packages/server/src/git/repository.ts')
-rw-r--r--packages/server/src/git/repository.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/server/src/git/repository.ts b/packages/server/src/git/repository.ts
index 4250af0..ccc8bcc 100644
--- a/packages/server/src/git/repository.ts
+++ b/packages/server/src/git/repository.ts
@@ -183,11 +183,11 @@ export class Repository {
* @param base_dir - The directory that contains the repositories
* @returns An array of repository instances
*/
- public static async openAll(base_dir: string): Promise<Repository[] | null> {
+ public static async openAll(base_dir: string): Promise<Repository[]> {
const dir_content = await getDirectory(base_dir);
if(dir_content.length === 0) {
- return null;
+ return [];
}
const repositories = dir_content.filter(dir_entry => dir_entry.endsWith(".git"));