Skip to content

Commit

Permalink
Fix showing measurement with no locations
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinKolarik committed Dec 27, 2024
1 parent 4be8b78 commit 4478735
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/views/pages/globalping/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,7 @@

// only the first target's response returns locations
if (isFirstShareReq) {
let magicValue = testRes.locations.reduce((res, loc) => {
let magicValue = testRes.locations?.reduce((res, loc) => {
if (loc.magic) {
res += res.length ? `, ${loc.magic}` : loc.magic;

Expand Down Expand Up @@ -2592,8 +2592,11 @@
setTimeout(() => {
// do not zoom if test was done for the World.
if (
locations.length === 1
&& (locations[0].magic.toLowerCase() === 'world' || locations[0].magic === '')
!locations
|| (
locations.length === 1
&& (locations[0].magic.toLowerCase() === 'world' || locations[0].magic === '')
)
) {
return;
}
Expand Down

0 comments on commit 4478735

Please sign in to comment.