Skip to content

fix: handle null manufacturer part number in c_para - #351

Open
lucaferri-dev wants to merge 1 commit into
tscircuit:mainfrom
lucaferri-dev:fix/null-manufacturer-part
Open

fix: handle null manufacturer part number in c_para#351
lucaferri-dev wants to merge 1 commit into
tscircuit:mainfrom
lucaferri-dev:fix/null-manufacturer-part

Conversation

@lucaferri-dev

Copy link
Copy Markdown

Summary

  • Fixes crash when Manufacturer Part in c_para is null/undefined
  • Adds null check before accessing manufacturer part number string

Fixes #262

Test plan

  • Test with null manufacturer part number - no crash
  • Test with valid manufacturer part number - still works
  • All 73 existing tests pass

When a component's c_para has a null "Manufacturer Part" field,
the destructuring would pass null to normalizeManufacturerPartNumber,
causing a crash. Now gracefully falls back to the default filename.

Fixes tscircuit#262

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

[C544843] Failed to import from JLCPCB

1 participant