diff options
| author | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2018-12-09 03:41:18 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-09 03:41:18 +0900 |
| commit | e87b9cc019eb4a8e6cef84dda2f1e6ff81eef320 (patch) | |
| tree | f75b8730b3c8261b1be737bb0214bb52756c2d73 /src | |
| parent | Eliminate if-statement (#3555) (diff) | |
| download | misskey-e87b9cc019eb4a8e6cef84dda2f1e6ff81eef320.tar.gz misskey-e87b9cc019eb4a8e6cef84dda2f1e6ff81eef320.tar.bz2 misskey-e87b9cc019eb4a8e6cef84dda2f1e6ff81eef320.zip | |
Use && to eliminate if-statement (#3558)
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/app/common/hotkey.ts | 6 |
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(); |