Skip to content

Commit 514c67b

Browse files
committed
review comments
1 parent 7530056 commit 514c67b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

localEvaluation/localEvaluation.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func fetch(user UserProperties) (*local.EvaluationResult, error) {
119119

120120
func getValue(flagName string, user UserProperties) local.EvaluationVariant {
121121
result, _ := fetch(user)
122-
if *result != nil {
122+
if result != nil && *result != nil {
123123
if value, ok := (*result)[flagName]; ok {
124124
return value.Variant
125125
}
@@ -130,7 +130,7 @@ func getValue(flagName string, user UserProperties) local.EvaluationVariant {
130130
func getMapOfValue(user UserProperties) map[string]interface{} {
131131
flags := make(map[string]interface{})
132132
result, _ := fetch(user)
133-
if *result != nil {
133+
if result != nil && *result != nil {
134134
for k, v := range *result {
135135
if v.IsDefaultVariant {
136136
continue

0 commit comments

Comments
 (0)