keyboard: Fix JS warning

Iterate correctly through the array, instead of stepping on the possibly
non existent first element.
This commit is contained in:
Carlos Garnacho 2019-01-21 21:41:46 +01:00 committed by Florian Müllner
parent bb215966e5
commit 83eb75ad7a

View File

@ -860,7 +860,7 @@ var Keyboard = class Keyboard {
}
_setCurrentLevelLatched(layout, latched) {
for (let i = 0; layout.shiftKeys[i]; i++) {
for (let i = 0; i < layout.shiftKeys.length; i++) {
let key = layout.shiftKeys[i];
key.setLatched(latched);
}