Skip to content

Conversation

@mattt
Copy link
Contributor

@mattt mattt commented May 29, 2024

Resolves #265

#184 introduced a regression in how array input values are serializes.

if (Array.isArray(value)) {
let copy = [];
for (const val of value) {
copy = await transform(val, mapper);
}
return copy;
}

This PR fixes the logic to append transformed values to the array instead of copying them.

if (Array.isArray(value)) {
const copy = [];
for (const val of value) {
const transformed = await transform(val, mapper);
copy.push(transformed);
}
return copy;
}

@mattt mattt force-pushed the mattt/fix-files-regression branch from ae68faa to cfb8ff4 Compare May 29, 2024 17:56
@mattt mattt force-pushed the mattt/fix-files-regression branch from cfb8ff4 to ab69c56 Compare May 29, 2024 17:56
@mattt mattt merged commit d981fc1 into main May 29, 2024
@mattt mattt deleted the mattt/fix-files-regression branch May 29, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API responds 422 when input contains string[]

1 participant