@dronedeploy/rocos-js-sdk 3.0.1-alpha.24 → 3.0.1-alpha.25
Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,10 @@ const cleanObject = (object) => {
|
|
5
5
|
return {
|
6
6
|
...(function _flatten(o) {
|
7
7
|
return [...Object.entries(o)].reduce((obj, [key, val]) => {
|
8
|
-
if (
|
8
|
+
if (val === null) {
|
9
|
+
obj[key] = val;
|
10
|
+
}
|
11
|
+
else if (typeof val === 'object') {
|
9
12
|
obj[key] = _flatten(val);
|
10
13
|
}
|
11
14
|
else if (typeof val === 'function') {
|
@@ -2,7 +2,10 @@ export const cleanObject = (object) => {
|
|
2
2
|
return {
|
3
3
|
...(function _flatten(o) {
|
4
4
|
return [...Object.entries(o)].reduce((obj, [key, val]) => {
|
5
|
-
if (
|
5
|
+
if (val === null) {
|
6
|
+
obj[key] = val;
|
7
|
+
}
|
8
|
+
else if (typeof val === 'object') {
|
6
9
|
obj[key] = _flatten(val);
|
7
10
|
}
|
8
11
|
else if (typeof val === 'function') {
|