@punks/backend-entity-manager 0.0.382 → 0.0.383
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/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -204,7 +204,7 @@ const DEFAULT_ARRAY_SEPARATOR = "|";
|
|
|
204
204
|
const splitArrayColumn = (value, separator) => value
|
|
205
205
|
?.toString()
|
|
206
206
|
.split(separator ?? DEFAULT_ARRAY_SEPARATOR)
|
|
207
|
-
.filter((x) => x.trim());
|
|
207
|
+
.filter((x) => x.trim()) ?? [];
|
|
208
208
|
const joinArrayColumn = (value, separator) => value
|
|
209
209
|
?.map((x) => x.toString().trim())
|
|
210
210
|
.filter((x) => x)
|
|
@@ -40752,7 +40752,7 @@ const fieldOptionValidator = (item, selector, { availableOptions, required, }) =
|
|
|
40752
40752
|
};
|
|
40753
40753
|
};
|
|
40754
40754
|
const fieldOptionsValidator = (item, selector, { availableOptions, minSelected, maxSelected, }) => {
|
|
40755
|
-
const values = selector(item);
|
|
40755
|
+
const values = selector(item) ?? [];
|
|
40756
40756
|
const errors = [];
|
|
40757
40757
|
const invalidOptions = values.filter((x) => !availableOptions.includes(x));
|
|
40758
40758
|
invalidOptions.forEach((x) => errors.push({ errorCode: "invalidOption", value: x }));
|