refactor: remove unnecessary check

This commit is contained in:
Carlos Valente
2024-07-02 16:49:16 +02:00
committed by Carlos Valente
parent 9f395cb16d
commit d94c1d4252
-4
View File
@@ -293,10 +293,6 @@ export type ParsingError = {
* @returns {object} - parsed object
*/
export function parseJson(jsonData: Partial<DatabaseModel>): { 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);