Don't throw in array/dict conversion
| @@ -79,7 +79,8 @@ export function convertValueType(value, type) { | |||
| 79 | if (Array.isArray(parsedArray)) { | 79 | if (Array.isArray(parsedArray)) { |
| 80 | return parsedArray; | 80 | return parsedArray; |
| 81 | } | 81 | } |
| 82 | throw new Error('Value is not an array.'); | 82 | // The value is not an array |
| 83 | return []; | ||
| 83 | } catch { | 84 | } catch { |
| 84 | return []; | 85 | return []; |
| 85 | } | 86 | } |
| @@ -92,7 +93,8 @@ export function convertValueType(value, type) { | |||
| 92 | if (typeof parsedObject === 'object') { | 93 | if (typeof parsedObject === 'object') { |
| 93 | return parsedObject; | 94 | return parsedObject; |
| 94 | } | 95 | } |
| 95 | throw new Error('Value is not an object.'); | 96 | // The value is not an object |
| 97 | return {}; | ||
| 96 | } catch { | 98 | } catch { |
| 97 | return {}; | 99 | return {}; |
| 98 | } | 100 | } |