From 453f26817ad427e566224acbeb583fe75c96bbe7 Mon Sep 17 00:00:00 2001 From: Aditya Toshniwal Date: Tue, 20 Jul 2021 14:58:24 +0530 Subject: [PATCH] Check if type is string for nested type changes parsing. --- web/pgadmin/static/js/SchemaView/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pgadmin/static/js/SchemaView/index.jsx b/web/pgadmin/static/js/SchemaView/index.jsx index 3448c8b07..43ddb986c 100644 --- a/web/pgadmin/static/js/SchemaView/index.jsx +++ b/web/pgadmin/static/js/SchemaView/index.jsx @@ -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 {