[gnome-shell/wip/carlosg/osk-emoji-and-keypad: 29/34] keyboard: Fix JS warning
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/osk-emoji-and-keypad: 29/34] keyboard: Fix JS warning
- Date: Tue, 5 Feb 2019 12:20:08 +0000 (UTC)
commit 77a3e7be5209bf5ec5b529a102d14eb63ce6426c
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jan 21 21:41:46 2019 +0100
keyboard: Fix JS warning
Iterate correctly through the array, instead of stepping on the possibly
non existent first element.
js/ui/keyboard.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index a37580b32..b1fafb953 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]