mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-24 20:06:55 +01:00
Fixes a bug / uncovered edge case in the flag resolver in Unleash: If a local experiment was defined as false (the typical default value), then that flag could only ever be returned as a boolean from the `ui-config` endpoint. In other words, even if the external resolver has a variant for that flag, the UI would never get the variant. The fix is to not just check `isEnabled` for false flags, but instead: - use `getVariant` - then check `variant.enabled` (in which case we have a variant and can return it) - else check `variant.feature_enabled`, falling back to `isEnabled` only if `feature_enabled` is null/undefined. |
||
|---|---|---|
| .. | ||
| lib | ||
| mailtemplates | ||
| migrations | ||
| test | ||
| migrator.ts | ||
| server-dev.ts | ||
| server.ts | ||
| test-setup.ts | ||