ws-process 0.3.30 → 0.3.31

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.
Files changed (2) hide show
  1. package/index.js +11 -2
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-unresolved */
1
2
  // ws-process.js
2
3
  import axios from 'axios';
3
4
  import {
@@ -558,6 +559,9 @@ function asyncSend(msg) {
558
559
  local.dispatch(updateWSCount(processID));
559
560
  reject(ex);
560
561
  }).then((data) => {
562
+ if (data === undefined) {
563
+ return data;
564
+ }
561
565
  const bodyUrl = tryit(() => data.data.getBodyFromUrl === true && data.data.url);
562
566
  if (bodyUrl) {
563
567
  return axios({
@@ -569,6 +573,10 @@ function asyncSend(msg) {
569
573
  }
570
574
  return data;
571
575
  }).then((data) => {
576
+ if (data === undefined) {
577
+ return data;
578
+ }
579
+
572
580
  if (process.env.NODE_ENV === 'test') {
573
581
  // pass
574
582
  } else {
@@ -612,7 +620,7 @@ function asyncSend(msg) {
612
620
  data: newData,
613
621
  });
614
622
  }
615
- return;
623
+ return undefined;
616
624
  }
617
625
  }
618
626
 
@@ -620,10 +628,11 @@ function asyncSend(msg) {
620
628
  newData, getState,
621
629
  );
622
630
  if (terminate === true) {
623
- return;
631
+ return undefined;
624
632
  }
625
633
 
626
634
  resolve(newData);
635
+ return undefined;
627
636
  });
628
637
  }
629
638
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ws-process",
3
- "version": "0.3.30",
3
+ "version": "0.3.31",
4
4
  "description": "Process Management for Web Socket Client",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -25,7 +25,7 @@
25
25
  "homepage": "https://github.com/bsgp/ws-process#readme",
26
26
  "peerDependencies": {
27
27
  "@bsgp/lib-core": "0.2.510",
28
- "axios": "0.21.1",
28
+ "axios": "1.3.4",
29
29
  "immer": "3.1.3",
30
30
  "react": "16.8.6",
31
31
  "react-dom": "16.8.6",