diff options
author | ThibG <thib@sitedethib.com> | 2020-07-01 21:51:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-01 21:51:16 +0200 |
commit | 665eb1affe7ba765af476e6f00096aad3af70735 (patch) | |
tree | 20fbd695cfc9bad551abead27a80fdb0e19567b9 /app/javascript/core | |
parent | 39a0622de70dc24275808cee9526658bd68a55ed (diff) | |
parent | f60c78ff3e42e321b457a7d63868b49bf56adfda (diff) |
Merge pull request #1369 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/core')
-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'; + } } }); |