@bjsdistribution/dms-client-return 0.0.36 → 0.0.37

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.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.36",
2
+ "version": "0.0.37",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -106,19 +106,21 @@ function SelectionFilter() {
106
106
  );
107
107
 
108
108
  if (filteredClient) {
109
- const mappedActions = filteredClient?.actions?.map((action: any) => ({
110
- label: action,
111
- value: action,
112
- }));
109
+ const mappedActions = Array.isArray(filteredClient?.actions)
110
+ ? filteredClient?.actions?.map((action: any) => ({
111
+ label: action,
112
+ value: action,
113
+ }))
114
+ : [];
113
115
 
114
116
  setActionTypeOptions(mappedActions);
115
117
 
116
- const mappedLocations = filteredClient?.return_locations?.map(
117
- (location: any) => ({
118
- label: location,
119
- value: location,
120
- })
121
- );
118
+ const mappedLocations = Array.isArray(filteredClient?.return_locations)
119
+ ? filteredClient?.return_locations?.map((location: any) => ({
120
+ label: location,
121
+ value: location,
122
+ }))
123
+ : [];
122
124
 
123
125
  setLocationOptions(mappedLocations);
124
126
  }