summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAya Morisawa <AyaMorisawa4869@gmail.com>2018-12-09 03:41:18 +0900
committerGitHub <noreply@github.com>2018-12-09 03:41:18 +0900
commite87b9cc019eb4a8e6cef84dda2f1e6ff81eef320 (patch)
treef75b8730b3c8261b1be737bb0214bb52756c2d73
parentEliminate if-statement (#3555) (diff)
downloadmisskey-e87b9cc019eb4a8e6cef84dda2f1e6ff81eef320.tar.gz
misskey-e87b9cc019eb4a8e6cef84dda2f1e6ff81eef320.tar.bz2
misskey-e87b9cc019eb4a8e6cef84dda2f1e6ff81eef320.zip
Use && to eliminate if-statement (#3558)
-rw-r--r--src/client/app/common/hotkey.ts6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/client/app/common/hotkey.ts b/src/client/app/common/hotkey.ts
index f7366e35cb..28a5ec204d 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();