opengate-js 11.18.2 → 11.18.3

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,6 +1,6 @@
1
1
  {
2
2
  "name": "opengate-js",
3
- "version": "11.18.2",
3
+ "version": "11.18.3",
4
4
  "description": "",
5
5
  "main": "dist/opengate-api-npm.js",
6
6
  "repository": {
@@ -3,6 +3,7 @@
3
3
  import HttpStatus from 'http-status-codes';
4
4
  import BaseProvision from '../BaseProvision';
5
5
  import q from 'q';
6
+ import _ from 'lodash'
6
7
 
7
8
  const ERROR_VALUE_NOT_ALLOWED = 'value is not allowed. The value should be formatted as follows: ';
8
9
  const ERROR_DATASTREAM_NOT_ALLOWED = 'Datastream is not allowed';
@@ -88,9 +89,13 @@ export default class SimpleBuilder extends BaseProvision {
88
89
  */
89
90
  with(_id, val) {
90
91
  if (val === undefined || val.length === 0) {
91
- delete this._entity[_id];
92
- return this;
92
+ // Si es un array vacío debe continuar
93
+ if (!_.isArray(val)) {
94
+ delete this._entity[_id];
95
+ return this;
96
+ }
93
97
  }
98
+
94
99
  if (this.getAllowedDatastreams().filter(function(ds) {
95
100
  return ds.identifier === _id;
96
101
  }).length !== 1) {
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"mappings":"","sources":["opengate-api-bower.js"],"file":"opengate-api-bower-11.18.2.js","sourceRoot":".."}