Skip to content

Commit

Permalink
ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
wwrk22 committed Jan 25, 2024
1 parent 44ba9ec commit 832fff6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions app/javascript/src/emoji_selector.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
document.addEventListener('click', function(event) {
const emojiSelections = document.querySelectorAll('details[open].emoji-selection');
document.addEventListener('click', (event) => {
const emojiSelections = document.querySelectorAll('details[open].emoji-selection');

if (emojiSelections.length > 0) {
const selectionClicked = [...emojiSelections].some(
selection => selection.contains(event.target)
);
if (emojiSelections.length > 0) {
const selectionClicked = [...emojiSelections].some(
(selection) => selection.contains(event.target),
);

if (selectionClicked === false) {
emojiSelections.forEach(selection => selection.removeAttribute('open'));
}
}
if (selectionClicked === false) {
emojiSelections.forEach((selection) => selection.removeAttribute('open'));
}
}
});

0 comments on commit 832fff6

Please sign in to comment.