Skip to content

Commit 9db990e

Browse files
committed
Fix the is_our_page function, which just didn't work
- Now does the code it used to, rather than some code that clearly didn't work
1 parent 2351dac commit 9db990e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

browser-extensions/common/js/lib/challenges.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,7 @@ function generate_stats(data) {
965965

966966
// Stats that need the user data available, and we are on their page (i.e. has
967967
// to be the person who has installed the plugin)
968+
console.log("Should we add the NENDY? - is_our_page:"+is_our_page(data) + " has_geo_data:"+has_geo_data(data))
968969
if (data.info.has_parkrun_results && has_geo_data(data) && is_our_page(data) && data.info.has_home_parkrun) {
969970
stats['furthest_travelled'] = generate_stat_furthest_travelled(data.parkrun_results, data.geo_data, data.user_data.home_parkrun_info)
970971
stats['nearest_event_not_done_yet'] = generate_stat_nearest_event_not_done_yet(data.parkrun_results, data.geo_data, data.user_data.home_parkrun_info)
@@ -1811,7 +1812,8 @@ function challenge_tourist(data, params) {
18111812
// Just return true for now
18121813
// Return true if the athlete id for this page match what is stored in the user data
18131814
function is_our_page(data) {
1814-
return has_user_data_athlete_id(data) && has_this_athlete_id(data) && get_user_data_athlete_id(data) == get_this_athlete_id(data)
1815+
// return has_user_data_athlete_id(data) && has_this_athlete_id(data) && get_user_data_athlete_id(data) == get_this_athlete_id(data)
1816+
return data.info.is_our_page
18151817
}
18161818

18171819
function has_user_data(data) {

0 commit comments

Comments
 (0)