@hexclave/dashboard-ui-components 1.0.129 → 1.0.130
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.
|
@@ -8112,7 +8112,7 @@ attempted value: ${formattedValue}
|
|
|
8112
8112
|
type: "record",
|
|
8113
8113
|
keySchema,
|
|
8114
8114
|
valueSchema
|
|
8115
|
-
} }).unknown(true).test("record", "${path} must be a record of valid values", async function(value, context) {
|
|
8115
|
+
} }).unknown(true).transform((value) => typeof value === "object" && value !== null && !Array.isArray(value) ? { ...value } : value).test("record", "${path} must be a record of valid values", async function(value, context) {
|
|
8116
8116
|
if (value == null) return true;
|
|
8117
8117
|
const { path, createError } = this;
|
|
8118
8118
|
if (typeof value !== "object") return createError({ message: `${path} must be an object` });
|
|
@@ -8132,7 +8132,7 @@ attempted value: ${formattedValue}
|
|
|
8132
8132
|
}
|
|
8133
8133
|
};
|
|
8134
8134
|
const validatedValue = await yupValidate(valueSchema, value[key], childOptions);
|
|
8135
|
-
Object.defineProperty(value, key, {
|
|
8135
|
+
if (!Object.is(validatedValue, value[key])) Object.defineProperty(value, key, {
|
|
8136
8136
|
value: validatedValue,
|
|
8137
8137
|
writable: true,
|
|
8138
8138
|
enumerable: true,
|