flagsmith-nodejs 5.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,7 +37,7 @@ class Flag extends BaseFlag {
37
37
  static fromAPIFlag(flagData) {
38
38
  return new Flag({
39
39
  enabled: flagData['enabled'],
40
- value: flagData['feature_state_value'] || flagData['value'],
40
+ value: flagData['feature_state_value'] ?? flagData['value'],
41
41
  featureId: flagData['feature']['id'],
42
42
  featureName: flagData['feature']['name']
43
43
  });
@@ -32,7 +32,7 @@ export class Flag extends BaseFlag {
32
32
  static fromAPIFlag(flagData) {
33
33
  return new Flag({
34
34
  enabled: flagData['enabled'],
35
- value: flagData['feature_state_value'] || flagData['value'],
35
+ value: flagData['feature_state_value'] ?? flagData['value'],
36
36
  featureId: flagData['feature']['id'],
37
37
  featureName: flagData['feature']['name']
38
38
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flagsmith-nodejs",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "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.",
5
5
  "main": "./build/cjs/index.js",
6
6
  "type": "module",
package/sdk/models.ts CHANGED
@@ -54,7 +54,7 @@ export class Flag extends BaseFlag {
54
54
  static fromAPIFlag(flagData: any): Flag {
55
55
  return new Flag({
56
56
  enabled: flagData['enabled'],
57
- value: flagData['feature_state_value'] || flagData['value'],
57
+ value: flagData['feature_state_value'] ?? flagData['value'],
58
58
  featureId: flagData['feature']['id'],
59
59
  featureName: flagData['feature']['name']
60
60
  });