Repository navigation
fix: Return the default value for a flag that has no value - #656
Draft
kinyoklion wants to merge 1 commit into
Draft
kinyoklion wants to merge 1 commit into
kinyoklion wants to merge 1 commit into
Conversation
When the flag data had a null value or no value, the JSON variation methods returned null instead of the default value. Generated-by: termag
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the flag data for a flag had a null value or no value,
JsonVariationandJsonVariationDetailreturned null instead of the default value. A flag without a value cannot give a result, so the SDK now returns the default value, with the reason and variation index of the flag data, as js-core does. The typed variation methods already returned the default value with a WRONG_TYPE reason, and they do not change.Testing: a new client test fails before the change and passes after it. The harness tests for a null or omitted flag value in stream put and patch events and in a poll response change from fail to pass with the Beast and CURL builds. The full v2 contract suite with the Beast and CURL builds shows no other change.
SDK-3689
Opened from termag