Skip to content

Commit 25dbc6b

Browse files
committed
Update parseObject function to return an empty array for undefined input
1 parent 4200922 commit 25dbc6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/etrusted/common/utils.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const parseObject = (obj) => {
2-
if (!obj) return undefined;
2+
if (!obj) return [];
33

44
if (Array.isArray(obj)) {
55
return obj.map((item) => {

0 commit comments

Comments
 (0)