Skip to content

Commit ebde89a

Browse files
committed
fix: Change notification consistency.
The store should be updated before events are dispatched to ensure consistent data between event information and variation calls.
1 parent c0ef518 commit ebde89a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/client-sdk/src/flag_manager/flag_updater.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ void FlagUpdater::Upsert(Context const& context,
9595
return;
9696
}
9797

98+
flag_store_.Upsert(key, descriptor);
9899
if (HasListeners()) {
99100
// Existed and updated.
100101
if (existing && descriptor.item) {
@@ -112,7 +113,6 @@ void FlagUpdater::Upsert(Context const& context,
112113
// Do nothing.
113114
}
114115
}
115-
flag_store_.Upsert(key, descriptor);
116116
}
117117

118118
bool FlagUpdater::HasListeners() const {

0 commit comments

Comments
 (0)