I go to Challengs and enter in any challenge (ex: October Ride to 400) and no value are show:
this is happening in Safari and Chrome, and in challenges like October rundown,
I go to Challengs and enter in any challenge (ex: October Ride to 400) and no value are show:
this is happening in Safari and Chrome, and in challenges like October rundown,
Your challenges display correct number, because you are using decimal point separator.
Yes, that's a workaround. Change Number Format in Settings.
But rounding function on Connect website is just…
Yes, challenges with distance units, like KM, show 0.
Only steps challenges show correct number.
Values can be read from JSON:
October Ride to 400:
https://connect.garmin.com/modern/proxy/badgechallenge…
Did that, and the error persists. I looked at the Inspect/Console and it gives me a bunch of errors
What version does it report in the footer of the page? mine reports 4.36.0.17, 20.21.2.
Did yout try turning off plugins such as adblockers, that could attempt modifying the content of the page? Did you try it from another computer or a phone?
I got the exact same issue in all browsers I've tested. Tested with two computers and one phone. Turned off all plugins. Still the same error.
It is just visual. The progress bar is correct. It is only the progress value that shows 0.0.
It works in the app so I check the exact value there. You could also inspect the progress bar and get the percentage for the width of the blue part of the bar and calculate the value yourself
Yes, challenges with distance units, like KM, show 0.
Only steps challenges show correct number.
Values can be read from JSON:
October Ride to 400:
https://connect.garmin.com/modern/proxy/badgechallenge-service/badgeChallenge/7E5F70DAFCFB4040BBEA672DCA20DA9E
Yes, challenges with distance units, like KM, show 0.
My challenges still work fine. What version does your GC Web show?
Your challenges display correct number, because you are using decimal point separator.
Yes, that's a workaround. Change Number Format in Settings.
But rounding function on Connect website is just wrong,
it produces NaN values if a user use decimal comma separator.
Example: 80.4672 - "0,47" = NaN
(n, 'roundDecimal', function (e, t) //e:80.4672 t:true { var i = this.formatDecimalNumber(e % 1, 2), n = e - i, //n:NaN e:80.4672 r = i; //r:"0,47" i:"0,47" return r = t ? Math.ceil(10 * i) / 10 : Math.floor(10 * i) / 10, this.formatDecimalNumber(n + r, 1)
True, that's why normally numbers are localized, so everybody can see a format they used to.
But I'm more confused about this rounding function.
It works with point separator only because Javascript allows combining numbers with strings. There is clearly wrongly used format string function before calculations.
But even if there was a numeric rounding for i variable, I still don't understand why this function is so complicated.
This is how it rounds 80.4672 to "80.5":
function(e=80.4672, t=true) { i = formatDecimalNumber(80.4672 % 1, 2) = "0.47" n = 80.4672 - "0.47" = 79.9972 r = "0.47" return r = true ? 0.5 : 0.4, formatDecimalNumber(79.9972 + 0.5, 1) = "80.5" }
They removed that wrongly used localized formatting function on i variable:
i = this.formatDecimalNumber(e % 1, 2)
so challenges again show progress values also with decimal comma separator.
i = (e % 1).toFixed(2)
But from code side, toFixed() also returns a formatted string, with dot, so it works, but it's double converted (numeric -> string -> numeric), maybe better would be Math.round() which would keep value numeric.