@punks/backend-entity-manager 0.0.381 → 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/esm/index.js
CHANGED
|
@@ -189,7 +189,7 @@ const DEFAULT_ARRAY_SEPARATOR = "|";
|
|
|
189
189
|
const splitArrayColumn = (value, separator) => value
|
|
190
190
|
?.toString()
|
|
191
191
|
.split(separator ?? DEFAULT_ARRAY_SEPARATOR)
|
|
192
|
-
.filter((x) => x.trim());
|
|
192
|
+
.filter((x) => x.trim()) ?? [];
|
|
193
193
|
const joinArrayColumn = (value, separator) => value
|
|
194
194
|
?.map((x) => x.toString().trim())
|
|
195
195
|
.filter((x) => x)
|
|
@@ -40737,7 +40737,7 @@ const fieldOptionValidator = (item, selector, { availableOptions, required, }) =
|
|
|
40737
40737
|
};
|
|
40738
40738
|
};
|
|
40739
40739
|
const fieldOptionsValidator = (item, selector, { availableOptions, minSelected, maxSelected, }) => {
|
|
40740
|
-
const values = selector(item)
|
|
40740
|
+
const values = selector(item) ?? [];
|
|
40741
40741
|
const errors = [];
|
|
40742
40742
|
const invalidOptions = values.filter((x) => !availableOptions.includes(x));
|
|
40743
40743
|
invalidOptions.forEach((x) => errors.push({ errorCode: "invalidOption", value: x }));
|