Skip to content

Commit 22f948a

Browse files
author
Larry Botha
authored
Merge pull request #116 from DhyeyMoliya/master
Update isValid store when using array validation - improves util.getValues
2 parents ac8d3cb + 0d53877 commit 22f948a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function isEmpty(object) {
2828
function getValues(object) {
2929
let result = [];
3030
for (const [, value] of Object.entries(object)) {
31-
result = [...result, typeof value === 'object' ? getValues(value) : value];
31+
result = [...result, ...(typeof value === 'object' ? getValues(value) : [value])];
3232
}
3333
return result;
3434
}

0 commit comments

Comments
 (0)