diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/pages/sessions/new/oauth_remember_me.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/pages/sessions/new/oauth_remember_me.js b/app/assets/javascripts/pages/sessions/new/oauth_remember_me.js index 761618109a4..0c6ccd6e495 100644 --- a/app/assets/javascripts/pages/sessions/new/oauth_remember_me.js +++ b/app/assets/javascripts/pages/sessions/new/oauth_remember_me.js @@ -1,4 +1,5 @@ import $ from 'jquery'; +import { setUrlParam, removeUrlParam } from '~/lib/utils/common_utils'; /** * OAuth-based login buttons have a separate "remember me" checkbox. @@ -24,9 +25,9 @@ export default class OAuthRememberMe { const href = $(element).attr('href'); if (rememberMe) { - $(element).attr('href', `${href}?remember_me=1`); + $(element).attr('href', setUrlParam(href, 'remember_me', 1)); } else { - $(element).attr('href', href.replace('?remember_me=1', '')); + $(element).attr('href', removeUrlParam(href, 'remember_me')); } }); } |