about summary refs log tree commit diff
path: root/app/javascript/packs
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-07-01 13:51:50 +0200
committerGitHub <noreply@github.com>2020-07-01 13:51:50 +0200
commit4babf5b8b5ba8eca5a14f3b2813775240db8f8f1 (patch)
tree840d597df45554c6723ca0dd996fd3f5ffde5a13 /app/javascript/packs
parent35cedc922ced6502f18b11353df661cf61c8ae2f (diff)
Fix lock icon not being shown when locking account in profile settings (#14190)
Diffstat (limited to 'app/javascript/packs')
-rw-r--r--app/javascript/packs/public.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js
index 557823c96..08cc662e6 100644
--- a/app/javascript/packs/public.js
+++ b/app/javascript/packs/public.js
@@ -207,10 +207,12 @@ function main() {
   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';
+      }
     }
   });