1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-01 07:35:57 +09:00

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 54cb94db1d
commit e87b9cc019
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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