@bjsdistribution/dms-client-return 0.0.35 → 0.0.36

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.35",
2
+ "version": "0.0.36",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -152,18 +152,23 @@ function SelectionFilter() {
152
152
  const clientLocations = selectedClientValue?.return_locations || [];
153
153
 
154
154
  setActionTypeOptions(
155
- clientActions?.map((action: any) => ({
156
- label: action,
157
- value: action,
158
- }))
155
+ Array.isArray(clientActions)
156
+ ? clientActions?.map(action => ({
157
+ label: action,
158
+ value: action,
159
+ }))
160
+ : []
159
161
  );
160
162
 
161
163
  setLocationOptions(
162
- clientLocations?.map((action: any) => ({
163
- label: action,
164
- value: action,
165
- }))
164
+ Array.isArray(clientLocations)
165
+ ? clientLocations?.map(location => ({
166
+ label: location,
167
+ value: location,
168
+ }))
169
+ : []
166
170
  );
171
+
167
172
  //client value
168
173
  if (storedClientId) {
169
174
  dispatch({
@@ -192,7 +197,7 @@ function SelectionFilter() {
192
197
  });
193
198
  }
194
199
  //location value
195
- if (selectedLocationValue && selectedLocationValue.length > 0) {
200
+ if (selectedLocationValue && selectedLocationValue?.length > 0) {
196
201
  dispatch({
197
202
  type: 'SET_LOCATION_FILTER',
198
203
  payload: selectedLocationValue,