diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-05-22 11:45:55 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-22 04:45:55 +0200 |
commit | 84608c3ff8fe51654868546cca6e64730d06286e (patch) | |
tree | 89d9516e68427a016615d0378d747cbeeb5896d0 /app | |
parent | b69365e397c983f813f1cd14ec34deed9ced0f85 (diff) |
Add translations for counter of profile (#3214)
ref #3101
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/packs/public.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index 096c8af80..38ef7203e 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -98,10 +98,14 @@ delegate(document, '.status__content__spoiler-link', 'click', ({ target }) => { delegate(document, '.account_display_name', 'input', ({ target }) => { const nameCounter = document.querySelector('.name-counter'); - nameCounter.textContent = 30 - length(target.value); + if (nameCounter) { + nameCounter.textContent = 30 - length(target.value); + } }); delegate(document, '.account_note', 'input', ({ target }) => { const noteCounter = document.querySelector('.note-counter'); - noteCounter.textContent = 160 - length(target.value); + if (noteCounter) { + noteCounter.textContent = 160 - length(target.value); + } }); |