@dronedeploy/rocos-js-sdk 3.0.1-alpha.24 → 3.0.1-alpha.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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",