diff options
Diffstat (limited to 'app/assets/javascripts/pages/profiles/keys/index.js')
-rw-r--r-- | app/assets/javascripts/pages/profiles/keys/index.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/assets/javascripts/pages/profiles/keys/index.js b/app/assets/javascripts/pages/profiles/keys/index.js index 4214d5bffb2..1b291d9509d 100644 --- a/app/assets/javascripts/pages/profiles/keys/index.js +++ b/app/assets/javascripts/pages/profiles/keys/index.js @@ -1,9 +1,9 @@ import initConfirmModal from '~/confirm_modal'; import AddSshKeyValidation from '~/profile/add_ssh_key_validation'; -document.addEventListener('DOMContentLoaded', () => { - initConfirmModal(); +initConfirmModal(); +function initSshKeyValidation() { const input = document.querySelector('.js-add-ssh-key-validation-input'); if (!input) return; @@ -18,4 +18,6 @@ document.addEventListener('DOMContentLoaded', () => { confirmSubmit, ); addSshKeyValidation.register(); -}); +} + +initSshKeyValidation(); |