@sinclair/typebox 0.33.10 → 0.33.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.
|
@@ -118,7 +118,7 @@ function FromTuple(schema, references, value) {
|
|
|
118
118
|
function FromUnion(schema, references, value) {
|
|
119
119
|
const defaulted = ValueOrDefault(schema, value);
|
|
120
120
|
for (const inner of schema.anyOf) {
|
|
121
|
-
const result = Visit(inner, references, defaulted);
|
|
121
|
+
const result = Visit(inner, references, (0, index_2.Clone)(defaulted));
|
|
122
122
|
if ((0, index_1.Check)(inner, result)) {
|
|
123
123
|
return result;
|
|
124
124
|
}
|
|
@@ -114,7 +114,7 @@ function FromTuple(schema, references, value) {
|
|
|
114
114
|
function FromUnion(schema, references, value) {
|
|
115
115
|
const defaulted = ValueOrDefault(schema, value);
|
|
116
116
|
for (const inner of schema.anyOf) {
|
|
117
|
-
const result = Visit(inner, references, defaulted);
|
|
117
|
+
const result = Visit(inner, references, Clone(defaulted));
|
|
118
118
|
if (Check(inner, result)) {
|
|
119
119
|
return result;
|
|
120
120
|
}
|