From a75b651422c8e8409805d73e430ea639e69270bc Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 7 May 2013 16:27:29 -0700 Subject: [PATCH] Properly handle null. --- guacamole-common-js/src/main/resources/keyboard.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guacamole-common-js/src/main/resources/keyboard.js b/guacamole-common-js/src/main/resources/keyboard.js index d570e1b08..46b2bfa3c 100644 --- a/guacamole-common-js/src/main/resources/keyboard.js +++ b/guacamole-common-js/src/main/resources/keyboard.js @@ -291,6 +291,10 @@ Guacamole.Keyboard = function(element) { * http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent */ function get_keysym(keysyms, location) { + + if (!keysyms) + return null; + return keysyms[location] || keysyms[0]; }