fix(analytics): goatcounter pv greater than 1K cannot be converted to numbers (#1762)
The goatcounter PV report splits numbers with spaces, e.g. 1024 would be '1 024'
This commit is contained in:
parent
00a27a1b85
commit
33a1fa7cae
1 changed files with 2 additions and 1 deletions
|
@ -9,7 +9,8 @@
|
|||
fetch(url)
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
pv.innerText = new Intl.NumberFormat().format(data.count);
|
||||
const count = data.count.replace(/\s/g, '');
|
||||
pv.innerText = new Intl.NumberFormat().format(count);
|
||||
})
|
||||
.catch((error) => {
|
||||
pv.innerText = '1';
|
||||
|
|
Loading…
Reference in a new issue