Skip to content

Commit 0295938

Browse files
authored
refactor: Remove unnecessary nil check on EvaluationDetail.reason (#289)
1 parent d85a373 commit 0295938

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ldclient-rb/events.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,13 +513,13 @@ def make_output_events(events, summary)
513513
evaluation: {
514514
key: event.key,
515515
value: event.evaluation.value,
516+
reason: event.evaluation.reason,
516517
},
517518
}
518519

519520
out[:evaluation][:version] = event.version unless event.version.nil?
520521
out[:evaluation][:default] = event.default unless event.default.nil?
521522
out[:evaluation][:variation] = event.evaluation.variation_index unless event.evaluation.variation_index.nil?
522-
out[:evaluation][:reason] = event.evaluation.reason unless event.evaluation.reason.nil?
523523
out[:samplingRatio] = event.sampling_ratio unless event.sampling_ratio.nil? || event.sampling_ratio == 1
524524

525525
measurements = []

0 commit comments

Comments
 (0)