Skip to content

Commit a9fe422

Browse files
committed
RruForm: fix fatal error when supplying a flat value in the initial values for a parent root object of a field that is nested.
1 parent c8c834c commit a9fe422

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ const retainAll = <T1, T2>(firstArray: T1[], secondArray: T2[], comparator: (obj
4141
};
4242

4343
const isObjKey = <T extends object>(obj: T, key: any): key is keyof T => {
44-
return key in obj;
44+
if (typeof obj === 'object') {
45+
return key in obj;
46+
}
47+
return false;
4548
};
4649

4750
const resolveObjectAttribute = (path: string, obj: object): any => {

0 commit comments

Comments
 (0)