Skip to content

Commit d52fbac

Browse files
authored
Merge pull request #167 from Flagsmith/fix/number-zero-flag-value
fix: Return 0 as number flag value instead of undefined
2 parents 3d04ec7 + d1cfffe commit d52fbac

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flagsmith-nodejs",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"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.",
55
"main": "./build/cjs/index.js",
66
"type": "module",

sdk/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class Flag extends BaseFlag {
5454
static fromAPIFlag(flagData: any): Flag {
5555
return new Flag({
5656
enabled: flagData['enabled'],
57-
value: flagData['feature_state_value'] || flagData['value'],
57+
value: flagData['feature_state_value'] ?? flagData['value'],
5858
featureId: flagData['feature']['id'],
5959
featureName: flagData['feature']['name']
6060
});

0 commit comments

Comments
 (0)