From 93a4a8bf924588cd866714b86ec8f16f8d51dec0 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 29 Jul 2021 17:10:54 +0200 Subject: Organized tsconfigs, fixed tests and improved some backend functions --- packages/server/src/git/patch.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/server/src/git/patch.ts') diff --git a/packages/server/src/git/patch.ts b/packages/server/src/git/patch.ts index 45ffe23..4239ce4 100644 --- a/packages/server/src/git/patch.ts +++ b/packages/server/src/git/patch.ts @@ -130,12 +130,12 @@ export class Patch { * * @returns An array of hunk instances */ - public async getHunks(): Promise { + public async getHunks(): Promise { const content = (await this._content()).split("\n"); const hunks = await this._ng_patch.hunks(); if(hunks.length === 0) { - return null; + return []; } const hunks_data = hunks.reduce((result: Hunks, hunk, hunk_index) => { -- cgit v1.2.3-18-g5258