in packages/openfeature-web-provider/src/ConfidenceWebProvider.ts [133:147]
function contextChanges(oldContext: EvaluationContext, newContext: EvaluationContext): EvaluationContext {
const uniqueKeys = new Set([...Object.keys(newContext), ...Object.keys(oldContext)]);
const changes: EvaluationContext = {};
for (const key of uniqueKeys) {
if (!equal(newContext[key], oldContext[key])) {
if (key === 'targetingKey') {
// targetingKey is a special case, it should never set to null but rather undefined
changes[key] = newContext[key];
} else {
changes[key] = newContext[key] ?? null;
}
}
}
return changes;
}