From 8608465864a50704b09d24080da9966e67df1e41 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Sun, 9 Dec 2018 03:41:18 +0900 Subject: [PATCH] Use && to eliminate if-statement (#3558) --- src/client/app/common/hotkey.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/client/app/common/hotkey.ts b/src/client/app/common/hotkey.ts index f7366e35c..28a5ec204 100644 --- a/src/client/app/common/hotkey.ts +++ b/src/client/app/common/hotkey.ts @@ -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();