Skip to content

Commit

Permalink
fix formData processing for remix < 1.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
justindsmith committed Sep 19, 2023
1 parent 57ff8ad commit c27a447
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/instrumentation-remix/src/instrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ export class RemixInstrumentation extends InstrumentationBase {
const formData = await clonedRequest.formData();
const { actionFormDataAttributes: actionFormAttributes } = plugin.getConfig();
formData.forEach((value, key) => {
if (actionFormAttributes[key] !== false) {
if (actionFormAttributes[key] && actionFormAttributes[key] !== false) {
const keyName = actionFormAttributes[key] === true ? key : actionFormAttributes[key];
span.setAttribute(`formData.${keyName}`, value.toString());
}
Expand Down

0 comments on commit c27a447

Please sign in to comment.