Skip to content

Transpiled React code detects wrong names #17

@Swatinem

Description

@Swatinem
        return (0, c.BX)(a.Fragment, {
          children: [
            (0, c.tZ)(t, {
              children: (0, c.tZ)(s.Z, {
                onSubmitError: (e) => {
                  (0, n.Iw)(
                    (0, i._N)("Something went wrong! [error]", { error: e })
                  );
                },
                children: w.map((e) => (0, c.tZ)(o.Z, { field: e }, e.name)),
              }),
            }),
          ],
        });

This is the simplified minified snippet for this original:

https://github.com/getsentry/sentry/blob/6bb5c0b800104c70456dc9fcddc7d94d5132fe90/static/app/components/modals/createReleaseIntegrationModal.tsx#L43-L100

The name is being detected as <object>.childrenchildrenonSubmitError, whereas it should probably just be <object>.onSubmitError.

The parent object is being passed as an argument to a function call at which point we should stop our search upwards the syntax tree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions