We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d7ed8a commit 7fb69f1Copy full SHA for 7fb69f1
packages/tdb-documents-ui/src/formActions.js
@@ -10,10 +10,10 @@ function removeEmptyObject(data) {
10
11
return Object.keys(data).reduce(function(accumulator, key) {
12
//const isObject = typeof data[key] === 'object';
13
- const isObject = !Array.isArray(data[key]) && typeof data[key] === 'object' ? true : false
+ const isObject = !Array.isArray(data[key]) && data[key]!==null && typeof data[key] === 'object' ? true : false
14
const value = isObject ? removeEmptyObject(data[key]) : data[key];
15
const isEmptyObject = isObject && !Object.keys(value).length;
16
- if (value === undefined || isEmptyObject) {
+ if (value ===null && value === undefined || isEmptyObject) {
17
return accumulator;
18
}
19
0 commit comments