Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
Set context logic fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Calibretto committed Aug 2, 2023
1 parent b431f07 commit dad29e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/OpenFeature/OpenFeatureAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ public class OpenFeatureAPI {
}

public func setEvaluationContext(evaluationContext: EvaluationContext) {
getProvider()?.onContextSet(oldContext: self._context, newContext: evaluationContext)
let oldContext = self._context
self._context = evaluationContext
getProvider()?.onContextSet(oldContext: oldContext, newContext: evaluationContext)
}

public func getEvaluationContext() -> EvaluationContext? {
Expand Down

0 comments on commit dad29e4

Please sign in to comment.