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 11{
22 "name" : " @eppo/js-client-sdk-common" ,
3- "version" : " 4.0.1 " ,
3+ "version" : " 4.0.2 " ,
44 "description" : " Eppo SDK for client-side JavaScript applications (base for both web and react native)" ,
55 "main" : " dist/index.js" ,
66 "files" : [
Original file line number Diff line number Diff line change @@ -144,7 +144,12 @@ export class BanditEvaluator {
144144 let currTopScore : number | null = null ;
145145 let currTopAction : string | null = null ;
146146 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+ ) {
148153 currTopScore = actionScore ;
149154 currTopAction = actionKey ;
150155 }
You can’t perform that action at this time.
0 commit comments