Skip to content

Commit 3e0d42c

Browse files
authored
Merge pull request #68 from ForwardFinancing/allow-false-flag-values
fix: allow false as a flag value
2 parents 5da2d98 + 0a7abb3 commit 3e0d42c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/flagsmith/sdk/models/flags.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def from_feature_state_model(feature_state_model, identity_id)
7171
def from_api(json_flag_data)
7272
new(
7373
enabled: json_flag_data[:enabled],
74-
value: json_flag_data[:feature_state_value] || json_flag_data[:value],
74+
value: json_flag_data.fetch(:feature_state_value) { json_flag_data[:value] },
7575
feature_name: json_flag_data.dig(:feature, :name),
7676
feature_id: json_flag_data.dig(:feature, :id)
7777
)

0 commit comments

Comments
 (0)