Don't throw in array/dict conversion

5563d4918490b601606d0b21a8e7f5543d13904e

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +4 -2Showing whitespace changes
public/scripts/utils.js+4 -2
@@ -79,7 +79,8 @@ export function convertValueType(value, type) {
7979 if (Array.isArray(parsedArray)) {
8080 return parsedArray;
8181 }
8282 throw// newThe Error('Valuevalue is not an array.');
83+ return [];
8384 } catch {
8485 return [];
8586 }
@@ -92,7 +93,8 @@ export function convertValueType(value, type) {
9293 if (typeof parsedObject === 'object') {
9394 return parsedObject;
9495 }
9596 throw// newThe Error('Valuevalue is not an object.');
97+ return {};
9698 } catch {
9799 return {};
98100 }