File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
src/main/java/com/flagsmith/flagengine/segments Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -190,14 +190,22 @@ private static Boolean contextMatchesCondition(
190190 * @return Property value.
191191 */
192192 private static Object getContextValue (EvaluationContext context , String property ) {
193+ Object result ;
194+ if (context .getIdentity () != null && context .getIdentity ().getTraits () != null ) {
195+ result = context .getIdentity ().getTraits ().getAdditionalProperties ().get (property );
196+ if (result != null ) {
197+ return result ;
198+ }
199+ }
193200 if (property .startsWith ("$." )) {
194- return JsonPath
201+ result = JsonPath
195202 .using (jsonPathConfiguration )
196203 .parse (mapper .convertValue (context , Map .class ))
197204 .read (property );
198- }
199- if (context .getIdentity () != null ) {
200- return context .getIdentity ().getTraits ().getAdditionalProperties ().get (property );
205+ if (result instanceof List || result instanceof Map ) {
206+ return null ;
207+ }
208+ return result ;
201209 }
202210 return null ;
203211 }
You can’t perform that action at this time.
0 commit comments