Skip to content

Commit 52d43c6

Browse files
committed
Remove getter setter
1 parent 7fe646a commit 52d43c6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/getFlagsProxy.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function hasFlag(flags: LDFlagSet, flagKey: string) {
5555

5656
function toFlagsProxy(ldClient: LDClient, flags: LDFlagSet, flagKeyMap: LDFlagKeyMap): LDFlagSet {
5757
return new Proxy(flags, {
58-
// trap for reading a flag value that refreshes its value with `LDClient#variation` to trigger an evaluation event
58+
// trap for reading a flag value using `LDClient#variation` to trigger an evaluation event
5959
get(target, prop, receiver) {
6060
const currentValue = Reflect.get(target, prop, receiver);
6161
if (typeof prop === 'symbol') {
@@ -66,7 +66,6 @@ function toFlagsProxy(ldClient: LDClient, flags: LDFlagSet, flagKeyMap: LDFlagKe
6666
}
6767
const originalFlagKey = hasFlag(flagKeyMap, prop) ? flagKeyMap[prop] : prop;
6868
const nextValue = ldClient.variation(originalFlagKey, currentValue);
69-
Reflect.set(target, prop, nextValue, receiver);
7069

7170
return nextValue;
7271
},

0 commit comments

Comments
 (0)