-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getFeatureFlags on ConfigurationMapFeatureFlagProvider fails - Treats array as single object #74
Comments
Facing with same issue. FEATURE_FLAGS_KEY contains not a single feature flag but array of feature flags so it is incorrect to call this function for this array. Interesting how typescript compiled this code ) look like validateFeatureFlag. in source code we have that "any" wad written to avoid casts inside validateFeatureFlag function. However you can write validateFeatureFlag(flag: Partial< FeatureFlag >) and achieve same effect but get this error covered by compiler. |
Hey, @strickie @vputsenko Sorry for the late response. Looking into the issue. |
@vputsenko @strickie Sorry for the mistake. This is a bad bug. I didn't notice it during the code review. My fault. Sorry, orz We added this in 2.0.0-preview.3. Other packages before it should be fine. I will publish a bug fix release very soon. Sorry for the inconvenience. |
Great, Thank you! |
When calling
getFeatureFlags
onConfigurationMapFeatureFlagProvider
the call fails becaus the code call treats array as single objectIn
FeatureManagement-JavaScript/src/schema/validator.ts
Line 8 in 8fe0efd
In featureProvider.ts
FeatureManagement-JavaScript/src/featureProvider.ts
Line 30 in 8fe0efd
The same
validateFeatureFlag
function is called with both a singleFeatureFlag
and array ofFeatureFlag
but the function doesn't handle arrays.The text was updated successfully, but these errors were encountered: