File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -53,15 +53,14 @@ function hasFlag(flags: LDFlagSet, flagKey: string) {
5353function toFlagsProxy ( ldClient : LDClient , flags : LDFlagSet , flagKeyMap : LDFlagKeyMap ) : LDFlagSet {
5454 return new Proxy ( flags , {
5555 // trap for reading a flag value that refreshes its value with `LDClient#variation` to trigger an evaluation event
56- get ( target , prop ) {
57- const flagKey = prop . toString ( ) ;
58- const currentValue = Reflect . get ( target , flagKey ) ;
56+ get ( target , flagKey : string , reciever ) {
57+ const currentValue = Reflect . get ( target , flagKey , reciever ) ;
5958 if ( currentValue === undefined ) {
6059 return ;
6160 }
6261 const originalFlagKey = hasFlag ( flagKeyMap , flagKey ) ? flagKeyMap [ flagKey ] : flagKey ;
6362 const nextValue = ldClient . variation ( originalFlagKey , currentValue ) ;
64- Reflect . set ( target , flagKey , nextValue ) ;
63+ Reflect . set ( target , flagKey , nextValue , reciever ) ;
6564
6665 return nextValue ;
6766 } ,
You can’t perform that action at this time.
0 commit comments