diff --git a/public/scripts/utils.js b/public/scripts/utils.js index cdf5ce694..647b81ce6 100644 --- a/public/scripts/utils.js +++ b/public/scripts/utils.js @@ -79,7 +79,8 @@ export function convertValueType(value, type) { if (Array.isArray(parsedArray)) { return parsedArray; } - throw new Error('Value is not an array.'); + // The value is not an array + return []; } catch { return []; } @@ -92,7 +93,8 @@ export function convertValueType(value, type) { if (typeof parsedObject === 'object') { return parsedObject; } - throw new Error('Value is not an object.'); + // The value is not an object + return {}; } catch { return {}; }