diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2017-06-19 13:10:34 +0000 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2017-07-03 16:25:10 +0000 |
commit | 5050bfd9c98b8072067a265c121dc6de1dee42be (patch) | |
tree | 6f4df04b83581b1f6e73953df76b0f2fe959501d /app | |
parent | a931ead00cfa25752b9d66fd2c34f8463fdc54fc (diff) | |
download | gitlab-ce-5050bfd9c98b8072067a265c121dc6de1dee42be.tar.gz |
Get ESLint spec passing for the `OAuthRememberMe` class.
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/oauth_remember_me.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/assets/javascripts/oauth_remember_me.js b/app/assets/javascripts/oauth_remember_me.js index 3048f6fec90..8f4796f2ede 100644 --- a/app/assets/javascripts/oauth_remember_me.js +++ b/app/assets/javascripts/oauth_remember_me.js @@ -12,17 +12,17 @@ export default class OAuthRememberMe { } bindEvents() { - this.container.on('click', this.toggleRememberMe); + this.container.on('click', this.constructor.toggleRememberMe); } - toggleRememberMe(event) { - var rememberMe = $(event.target).is(":checked"); + static toggleRememberMe(event) { + const rememberMe = $(event.target).is(':checked'); - $('.oauth-login').each(function(i, element) { - var href = $(element).attr('href'); + $('.oauth-login').each((i, element) => { + const href = $(element).attr('href'); if (rememberMe) { - $(element).attr('href', href + '?remember_me=1'); + $(element).attr('href', `${href}?remember_me=1`); } else { $(element).attr('href', href.replace('?remember_me=1', '')); } |