Check if type is string for nested type changes parsing.

This commit is contained in:
Aditya Toshniwal 2021-07-20 14:58:24 +05:30 committed by Akshay Joshi
parent 51c11a21fa
commit 453f26817a

View File

@ -108,7 +108,7 @@ function getChangedData(topSchema, mode, sessData, stringify=false) {
/* Will be called recursively as data can be nested */
const parseChanges = (schema, accessPath, changedData)=>{
schema.fields.forEach((field)=>{
if((field.type||'').startsWith('nested-')) {
if(typeof(field.type) == 'string' && field.type.startsWith('nested-')) {
/* its nested */
parseChanges(field.schema, accessPath, changedData);
} else {