diff options
author | Starfall <us@starfall.systems> | 2020-07-01 16:04:26 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2020-07-01 16:04:26 -0500 |
commit | 9b8ab85007cc9b527ba8c59a3624731cd8e46ffe (patch) | |
tree | 28cf79b4c73ec6d328136ea04a63321862096e5a /app/javascript/core/settings.js | |
parent | 6ec1f4c99e51a13ca56d639b85168dfb874daf75 (diff) | |
parent | 665eb1affe7ba765af476e6f00096aad3af70735 (diff) |
Merge branch 'glitch' into main
Diffstat (limited to 'app/javascript/core/settings.js')
-rw-r--r-- | app/javascript/core/settings.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/javascript/core/settings.js b/app/javascript/core/settings.js index 9fe03f90c..9403e339b 100644 --- a/app/javascript/core/settings.js +++ b/app/javascript/core/settings.js @@ -34,10 +34,12 @@ delegate(document, '#account_header', 'change', ({ target }) => { delegate(document, '#account_locked', 'change', ({ target }) => { const lock = document.querySelector('.card .display-name i'); - if (target.checked) { - lock.style.display = 'inline'; - } else { - lock.style.display = 'none'; + if (lock) { + if (target.checked) { + delete lock.dataset.hidden; + } else { + lock.dataset.hidden = 'true'; + } } }); |