refactor(client): better semantics

This commit is contained in:
syuilo
2022-01-28 11:53:12 +09:00
parent 57ec04d9ec
commit b946d89ec1
32 changed files with 50 additions and 50 deletions

View File

@@ -280,7 +280,7 @@ function getKey(emoji: string | Misskey.entities.CustomEmoji | UnicodeEmojiDef):
}
function chosen(emoji: any, ev?: MouseEvent) {
const el = ev && (ev.currentTarget || ev.target) as HTMLElement | null | undefined;
const el = ev && (ev.currentTarget ?? ev.target) as HTMLElement | null | undefined;
if (el) {
const rect = el.getBoundingClientRect();
const x = rect.left + (el.offsetWidth / 2);