From d94c1d425263c7b85f8b8007cbbd0fbdcecc3d62 Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Tue, 2 Jul 2024 16:49:16 +0200 Subject: [PATCH] refactor: remove unnecessary check --- apps/server/src/utils/parser.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/server/src/utils/parser.ts b/apps/server/src/utils/parser.ts index 112554c5c..ce45365d3 100644 --- a/apps/server/src/utils/parser.ts +++ b/apps/server/src/utils/parser.ts @@ -293,10 +293,6 @@ export type ParsingError = { * @returns {object} - parsed object */ export function parseJson(jsonData: Partial): { data: DatabaseModel; errors: ParsingError[] } { - if (!jsonData || typeof jsonData !== 'object') { - throw new Error('Invalid JSON data'); - } - // we need to parse settings first to make sure the data is ours // this may throw const settings = parseSettings(jsonData);