mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-07 16:33:51 +00:00
refactor: remove unnecessary check
This commit is contained in:
committed by
Carlos Valente
parent
9f395cb16d
commit
d94c1d4252
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user