Skip to content

Use locally destructured mungeUnderscores instead of opts.mungeUnderscores - #1882

Closed
robhogan with Copilot wants to merge 2 commits into
pr1877from
copilot/fix-github-actions-job-again
Closed

Use locally destructured mungeUnderscores instead of opts.mungeUnderscores#1882
robhogan with Copilot wants to merge 2 commits into
pr1877from
copilot/fix-github-actions-job-again

Conversation

Copilot AI commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

opts can be undefined (it's an optional param), so accessing opts.mungeUnderscores directly is unsafe. The value is already safely destructured with a false default earlier in the function.

Change

  • scripts/generateTypeScriptDefinitions.js: Replace opts.mungeUnderscores with the locally destructured mungeUnderscores (which defaults to false via const {mungeUnderscores = false} = opts ?? {})
// Before
{mungeUnderscores: opts.mungeUnderscores}

// After
{mungeUnderscores}

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 26, 2026
…cores

Co-authored-by: robhogan <2590098+robhogan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Use locally destructured mungeUnderscores instead of opts.mungeUnderscores Aug 26, 2026
Copilot AI requested a review from robhogan August 26, 2026 07:22
@robhogan robhogan closed this Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants