Skip to content

Commit 88de241

Browse files
authored
fix(fsv/segfault): handle fsv being null (#82)
1 parent 1cf98fe commit 88de241

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

flagsmith/models.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ func MakeFeatureStateValueFromClientFSV(clientFSV *flagsmithapi.FeatureStateValu
4747
}
4848
switch fsvType {
4949
case "unicode":
50-
fsValue.StringValue = types.StringValue(*clientFSV.StringValue)
50+
if clientFSV.StringValue == nil {
51+
fsValue.StringValue = types.StringValue("")
52+
} else {
53+
fsValue.StringValue = types.StringValue(*clientFSV.StringValue)
54+
}
5155
return fsValue
5256

5357
case "int":

0 commit comments

Comments
 (0)