Use && to eliminate if-statement (#3558)

This commit is contained in:
Aya Morisawa 2018-12-09 03:41:18 +09:00 committed by GitHub
parent dece0c2bfb
commit 8608465864

View File

@ -77,11 +77,7 @@ export default {
const matched = match(e, action.patterns); const matched = match(e, action.patterns);
if (matched) { if (matched) {
if (el._hotkey_global) { if (el._hotkey_global && match(e, targetReservedKeys)) return;
if (match(e, targetReservedKeys)) {
return;
}
}
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();