diff options
author | Scott Escue <scott.escue@gmail.com> | 2018-11-27 07:16:24 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2019-01-10 00:00:39 -0600 |
commit | 2cbc475e5327a860032414561916c7bd725685ac (patch) | |
tree | abf5ca4adc9c2e2d3bc329dafe9aed1b37f35043 /app/assets/javascripts/pages/sessions/new | |
parent | a3541a8d8dd1f4db690b7293d2a7674287020e84 (diff) | |
download | gitlab-ce-2cbc475e5327a860032414561916c7bd725685ac.tar.gz |
Fixing static analysis issues
Diffstat (limited to 'app/assets/javascripts/pages/sessions/new')
-rw-r--r-- | app/assets/javascripts/pages/sessions/new/preserve_url_fragment.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/assets/javascripts/pages/sessions/new/preserve_url_fragment.js b/app/assets/javascripts/pages/sessions/new/preserve_url_fragment.js index 71b7ca8ec31..56ea39f1259 100644 --- a/app/assets/javascripts/pages/sessions/new/preserve_url_fragment.js +++ b/app/assets/javascripts/pages/sessions/new/preserve_url_fragment.js @@ -13,7 +13,7 @@ export default function preserveUrlFragment(fragment) { // Append the fragment to all sign-in/sign-up form actions so it is preserved when the user is // eventually redirected back to the originally requested URL. const forms = document.querySelectorAll('#signin-container form'); - Array.prototype.forEach.call(forms, (form) => { + Array.prototype.forEach.call(forms, form => { const actionWithFragment = setUrlFragment(form.getAttribute('action'), `#${normalFragment}`); form.setAttribute('action', actionWithFragment); }); @@ -21,8 +21,11 @@ export default function preserveUrlFragment(fragment) { // Append a redirect_fragment query param to all oauth provider links. The redirect_fragment // query param will be available in the omniauth callback upon successful authentication const anchors = document.querySelectorAll('#signin-container a.oauth-login'); - Array.prototype.forEach.call(anchors, (anchor) => { - const newHref = mergeUrlParams({ redirect_fragment: normalFragment }, anchor.getAttribute('href')); + Array.prototype.forEach.call(anchors, anchor => { + const newHref = mergeUrlParams( + { redirect_fragment: normalFragment }, + anchor.getAttribute('href'), + ); anchor.setAttribute('href', newHref); }); } |