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: Return 0 as number flag value instead of undefined #167

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flagsmith-nodejs",
"version": "5.0.0",
"version": "5.0.1",
"description": "Flagsmith lets you manage features flags and remote config across web, mobile and server side applications. Deliver true Continuous Integration. Get builds out faster. Control who has access to new features.",
"main": "./build/cjs/index.js",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion sdk/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class Flag extends BaseFlag {
static fromAPIFlag(flagData: any): Flag {
return new Flag({
enabled: flagData['enabled'],
value: flagData['feature_state_value'] || flagData['value'],
value: flagData['feature_state_value'] ?? flagData['value'],
featureId: flagData['feature']['id'],
featureName: flagData['feature']['name']
});
Expand Down
Loading