check whether window exists so that building in ssr's gonna be ok

pull/494/head
lencil 4 months ago committed by GitHub
parent b0038773f3
commit 3b329f51fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -350,7 +350,10 @@ function hotkeys(key, option, method) {
const keys = getKeys(key); // 需要处理的快捷键列表
let mods = [];
let scope = 'all'; // scope默认为all所有范围都有效
let element = document; // 快捷键事件绑定节点
let element; // 快捷键事件绑定节点
if (typeof window !== 'undefined') {
element = document;
}
let i = 0;
let keyup = false;
let keydown = true;

Loading…
Cancel
Save