idosell 0.4.4 → 0.4.11

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/dist/request.js CHANGED
@@ -180,7 +180,10 @@ export const checkParams = (request) => {
180
180
  const array = request.params[request.appendable.arrayNode];
181
181
  const last = array[array.length - 1];
182
182
  if (typeof last === 'object' && Object.keys(last).length === 0) {
183
- array.pop();
183
+ if (array.length === 1)
184
+ delete request.params[request.appendable.arrayNode];
185
+ else
186
+ array.pop();
184
187
  }
185
188
  }
186
189
  processRequired(request);