## TL;DR

What was reported: Issue optimizely/javascript-sdk#756 (closed, 7 comments): passing { deviceOs: undefined } as attributes made isFeatureEnabled return false even for an enabled feature.

## Steps

1. What was reported:
Issue optimizely/javascript-sdk#756 (closed, 7 comments): passing { deviceOs: undefined } as attributes made isFeatureEnabled return false even for an enabled feature. Maintainers confirmed undefined is not a supported attribute type (only strings, numbers, booleans, null) and tightened the UserAttribute type in PR #886 so unknown values are rejected at compile time.

2. What works:
Optimizely attributes accept strings, numbers, booleans, and null, not undefined. Passing undefined silently breaks audience evaluation, so isFeatureEnabled can return false for a feature that is on. Strip undefined values from your attributes object before calling decide or isFeatureEnabled, or default them to null. The SDK types now only allow the supported types (fixed in PR #886), so a TypeScript error on your attributes is the same bug wearing a different hat.

## When to use

You are seeing this: Maintainers confirmed undefined is not a supported attribute type (only strings, numbers, booleans, null) and tightened the UserAttribute type in PR #886 so unknown values are rejected at compile time. Use this skill when you run into "isFeatureEnabled returns false when an attribute value is undefined".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
