Skip to content

Commit 43c9c78

Browse files
wip: fix flag decision logic
1 parent 90b46c9 commit 43c9c78

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Sources/Implementation/DefaultDecisionService.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ class DefaultDecisionService: OPTDecisionService {
214214
user: OptimizelyUserContext,
215215
options: [OptimizelyDecideOption]? = nil) -> [DecisionResponse<FeatureDecision>] {
216216

217-
let reasons = DecisionReasons(options: options)
218217
let userId = user.userId
219218
let ignoreUPS = (options ?? []).contains(.ignoreUserProfileService)
220219
var profileTracker: UserProfileTracker?
@@ -227,11 +226,7 @@ class DefaultDecisionService: OPTDecisionService {
227226

228227
for featureFlag in featureFlags {
229228
let flagDecisionResponse = getDecisionForFlag(config: config, featureFlag: featureFlag, user: user, userProfileTracker: profileTracker)
230-
reasons.merge(flagDecisionResponse.reasons)
231-
232-
if let decision = flagDecisionResponse.result {
233-
decisions.append(DecisionResponse(result: decision, reasons: reasons))
234-
}
229+
decisions.append(flagDecisionResponse)
235230
}
236231

237232
// save profile

0 commit comments

Comments
 (0)