Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierZal committed Sep 14, 2024
1 parent 9eb3a44 commit c6e5d61
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,11 @@ const holidayModeEnabledElement = document.getElementById(

const disableButton = (id: string, value = true): void => {
const element = document.getElementById(id)
if (element) {
if (value) {
element.classList.add('is-disabled')
element?.classList.add('is-disabled')
return
}
element.classList.remove('is-disabled')
}
element?.classList.remove('is-disabled')
}

const enableButton = (id: string, value = true): void => {
Expand Down

0 comments on commit c6e5d61

Please sign in to comment.