change(web): implements arrow-func suggestion from #6567

This commit is contained in:
jahorton 2022-06-14 15:16:00 +07:00
parent 50656722bb
commit edef613dc8

View file

@ -271,13 +271,10 @@ namespace com.keyman.keyboards {
for(Ln=0; Ln < this.keyboardStubs.length; Ln++) { // I1511 - array prototype extended
Lstub = this.keyboardStubs[Ln];
let Lkbd;
for(let kbdIndex=0; kbdIndex < this.keyboards.length; kbdIndex++) {
if(this.keyboards[kbdIndex]['KI'] == Lstub['KI']) {
Lkbd = this.keyboards[kbdIndex];
break;
}
}
// In Chrome, (including on Android), Array.prototype.find() requires Chrome 45.
// This is a later version than the default on our oldest-supported Android devices.
const Lkbd = this.keyboards.find(k => k['KI'] == Lstub['KI']);
Lrn = this._GetKeyboardDetail(Lstub, Lkbd); // I2078 - Full keyboard detail
Lr=this.keymanweb._push(Lr,Lrn); // TODO: Resolve without need for the cast.
}