Skip to content
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

Fix error when calling variation before initialisation #361

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

thomaspoignant
Copy link
Owner

Description

Fix the error when calling variation before initialization.
The SDK was panicking if ff.BoolVariation or other variations functions were called before the initialization.

This PR ensure that we are not panicking anymore and that we return the default value.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking changes (change that is not backward-compatible and/or changes current functionality)

Closes issue(s)

Resolve #360

Checklist

  • I have tested this code
  • I have added unit test to cover this code
  • I have updated the documentation (README.md and /docs)
  • I have followed the contributing guide

@sonarcloud
Copy link

sonarcloud bot commented Oct 5, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 95.006% when pulling 03daa7e on fix-360 into d6dd663 on main.

@thomaspoignant thomaspoignant merged commit 47bc6fa into main Oct 5, 2022
@thomaspoignant thomaspoignant deleted the fix-360 branch October 5, 2022 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(bug) Nil pointer dereference when calling a variation without Init
2 participants