Fix the error for the parameter is empty.

pull/15/head
jaywcjlove 8 years ago
parent 06b4865075
commit 7245edc4c6

@ -256,8 +256,8 @@ function getMods (key) {
// 处理传的key字符串转换成数组
function getKeys(key) {
var keys,
index;
if (!key) key = '';
var keys,index;
key = key.replace(/\s/g, ''); // 匹配任何空白字符,包括空格、制表符、换页符等等
keys = key.split(','); // 同时设置多个快捷键,以','分割

Loading…
Cancel
Save