> This page is for SDKs, version Legacy.
> For other versions, use one of these documentation indexes:
> - Current (default): https://buildwithfern.com/learn/sdks/current/llms.txt
> - Legacy: https://buildwithfern.com/learn/sdks/legacy/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

## 4.1.3

**`(fix):`** Fix undiscriminated union variant matching in dynamic snippets selecting
incorrect variants when errors are added during conversion. The matcher
now checks whether errors were added (via `errors.size() > errorsBefore`)
alongside the existing `isNop` check, preventing empty objects from being
returned for union fields like `options` in generated code snippets.