Skip to content

Commit

Permalink
fix: stream delete command should only delete lower versions, not equal.
Browse files Browse the repository at this point in the history
  • Loading branch information
yusinto committed Dec 22, 2023
1 parent eb61ced commit 58f72c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shared/sdk-client/src/LDClientImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default class LDClientImpl implements LDClient {
this.logger.debug(`Streamer DELETE ${JSON.stringify(dataJson, null, 2)}`);
const existing = this.flags[dataJson.key];

if (existing && existing.version <= dataJson.version) {
if (existing && existing.version < dataJson.version) {
delete this.flags[dataJson.key];
await this.platform.storage?.set(canonicalKey, JSON.stringify(this.flags));
const changedKeys = [dataJson.key];
Expand Down

0 comments on commit 58f72c1

Please sign in to comment.