Properly handle null.

This commit is contained in:
Michael Jumper
2013-05-07 16:27:29 -07:00
parent 32bea8c30e
commit a75b651422

View File

@@ -291,6 +291,10 @@ Guacamole.Keyboard = function(element) {
* http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent * http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent
*/ */
function get_keysym(keysyms, location) { function get_keysym(keysyms, location) {
if (!keysyms)
return null;
return keysyms[location] || keysyms[0]; return keysyms[location] || keysyms[0];
} }