@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 (typeof val === 'object') {
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 (typeof val === 'object') {
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') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dronedeploy/rocos-js-sdk",
3
- "version": "3.0.1-alpha.24",
3
+ "version": "3.0.1-alpha.25",
4
4
  "description": "Javascript SDK for rocos",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",