From cc7a5371a89e5c7c3d74ff947caa26522376187b Mon Sep 17 00:00:00 2001 From: Caspar Neumann Date: Wed, 18 Oct 2023 16:20:43 +0200 Subject: [PATCH] refactor: set default for rangeStart --- .../h5p-editor/service/temporary-file-storage.service.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/server/src/modules/h5p-editor/service/temporary-file-storage.service.ts b/apps/server/src/modules/h5p-editor/service/temporary-file-storage.service.ts index 07396151548..036726e0e68 100644 --- a/apps/server/src/modules/h5p-editor/service/temporary-file-storage.service.ts +++ b/apps/server/src/modules/h5p-editor/service/temporary-file-storage.service.ts @@ -51,15 +51,12 @@ export class TemporaryFileStorage implements ITemporaryFileStorage { public async getFileStream( filename: string, user: IUser, - rangeStart?: number | undefined, + rangeStart = 0, rangeEnd?: number | undefined ): Promise { this.checkFilename(filename); const tempFile = await this.repo.findByUserAndFilename(user.id, filename); const path = this.getFilePath(user.id, filename); - if (rangeStart === undefined) { - rangeStart = 0; - } if (rangeEnd === undefined) { rangeEnd = tempFile.size - 1; }