We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We've started seeing an issue where number values like this one are being returned as type string when enableLocalEvaluation is set to true.
string
enableLocalEvaluation
true
Using this test script I've validated that the local evaluation causes the change in behaviour (thanks Matt for the help 🙌 )
This has been tested on flagsmith-nodejs versions 2.5.1 and 3.2.0
flagsmith-nodejs
2.5.1
3.2.0
import Flagsmith from 'flagsmith-nodejs'; async function main(): Promise<void> { const flagClient = new Flagsmith({ environmentKey: 'ser.key', enableLocalEvaluation: true, enableAnalytics: false, }); const environmentFlags = await flagClient.getEnvironmentFlags(); const flag = environmentFlags.getFlag('daisy.settlements.timeout'); console.log(`flagClient.apiUrl=${flagClient.apiUrl}`); console.log(`flagClient.enableLocalEvaluation=${flagClient.enableLocalEvaluation}`); console.log(JSON.stringify(flag)); console.log(`typeof flag.value=${typeof flag.value}`); await flagClient.close(); } void main();
enableLocalEvaluation=true
flagClient.apiUrl=https://edge.api.flagsmith.com/api/v1/ flagClient.enableLocalEvaluation=true {"value":"60000","enabled":true,"isDefault":false,"featureId":62178,"featureName":"daisy.settlements.timeout"} typeof flag.value=string
enableLocalEvaluation=false
flagClient.apiUrl=https://edge.api.flagsmith.com/api/v1/ flagClient.enableLocalEvaluation=false {"value":60000,"enabled":true,"isDefault":false,"featureId":62178,"featureName":"daisy.settlements.timeout"} typeof flag.value=number
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We've started seeing an issue where number values like this one are being returned as type
string
whenenableLocalEvaluation
is set totrue
.Using this test script I've validated that the local evaluation causes the change in behaviour (thanks Matt for the help 🙌 )
This has been tested on
flagsmith-nodejs
versions2.5.1
and3.2.0
enableLocalEvaluation=true
enableLocalEvaluation=false
The text was updated successfully, but these errors were encountered: