diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-07-01 01:01:49 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-07-06 18:10:02 +0300 |
commit | 128c6e70604f106b0e6c83f2c047b949629d064b (patch) | |
tree | a0e73d9c1591da2cac6c294cfa7fb688863f1c1f /app/assets/javascripts/username_validator.js | |
parent | 5530d801550942f8bbc9fb74a20eb8e08c362cb2 (diff) |
refactor UsernameValidator class to ES module syntax
Diffstat (limited to 'app/assets/javascripts/username_validator.js')
-rw-r--r-- | app/assets/javascripts/username_validator.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/assets/javascripts/username_validator.js b/app/assets/javascripts/username_validator.js index abe6c30f4f3..a348d69153c 100644 --- a/app/assets/javascripts/username_validator.js +++ b/app/assets/javascripts/username_validator.js @@ -8,7 +8,7 @@ const successMessageSelector = '.username .validation-success'; const pendingMessageSelector = '.username .validation-pending'; const invalidMessageSelector = '.username .gl-field-error'; -class UsernameValidator { +export default class UsernameValidator { constructor() { this.inputElement = $('#new_user_username'); this.inputDomElement = this.inputElement.get(0); @@ -129,5 +129,3 @@ class UsernameValidator { $inputErrorMessage.show(); } } - -window.UsernameValidator = UsernameValidator; |