diff --git a/src/views/pages/globalping/_index.html b/src/views/pages/globalping/_index.html index a8853e5d0..815b2f377 100644 --- a/src/views/pages/globalping/_index.html +++ b/src/views/pages/globalping/_index.html @@ -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; @@ -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; }