File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @eppo/js-client-sdk-common" ,
3
- "version" : " 4.0.1 " ,
3
+ "version" : " 4.0.2 " ,
4
4
"description" : " Eppo SDK for client-side JavaScript applications (base for both web and react native)" ,
5
5
"main" : " dist/index.js" ,
6
6
"files" : [
Original file line number Diff line number Diff line change @@ -144,7 +144,12 @@ export class BanditEvaluator {
144
144
let currTopScore : number | null = null ;
145
145
let currTopAction : string | null = null ;
146
146
actionScoreEntries . forEach ( ( [ actionKey , actionScore ] ) => {
147
- if ( currTopScore === null || actionScore > currTopScore ) {
147
+ if (
148
+ currTopScore === null ||
149
+ currTopAction === null ||
150
+ actionScore > currTopScore ||
151
+ ( actionScore === currTopScore && actionKey < currTopAction )
152
+ ) {
148
153
currTopScore = actionScore ;
149
154
currTopAction = actionKey ;
150
155
}
You can’t perform that action at this time.
0 commit comments