From 19128ec5de76db3cd359fc3e27748d543379034e Mon Sep 17 00:00:00 2001 From: octavioamu Date: Wed, 22 May 2019 18:40:59 -0300 Subject: [PATCH] fix call before initialization --- app/assets/v2/js/pages/new_bounty.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/v2/js/pages/new_bounty.js b/app/assets/v2/js/pages/new_bounty.js index 8a10b3038e8..7253754702a 100644 --- a/app/assets/v2/js/pages/new_bounty.js +++ b/app/assets/v2/js/pages/new_bounty.js @@ -4,7 +4,7 @@ load_tokens(); var localStorage = window.localStorage ? window.localStorage : {}; - +const quickstartURL = document.location.origin + '/bounty/quickstart'; const FEE_PERCENTAGE = document.FEE_PERCENTAGE / 100.0; var new_bounty = { @@ -14,10 +14,10 @@ var new_bounty = { if (localStorage['quickstart_dontshow'] !== 'true' && doShowQuickstart(document.referrer) && doShowQuickstart(document.URL)) { - window.location = document.location.origin + '/bounty/quickstart'; + window.location = quickstartURL } -const doShowQuickstart = url => { +function doShowQuickstart(url) { let blacklist = []; blacklist.push(document.location.origin + '/bounty/quickstart');