@panoramax/web-viewer 3.1.1-develop-e610c2fc → 3.1.1-develop-f4933670

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoramax/web-viewer",
3
- "version": "3.1.1-develop-e610c2fc",
3
+ "version": "3.1.1-develop-f4933670",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "build/index.js",
6
6
  "author": "Panoramax team",
@@ -552,14 +552,14 @@ export function isInternetFast() {
552
552
  }
553
553
  // Fallback for other browsers
554
554
  catch(e) {
555
- // Check if test has been done before and stored
556
- const isFast = sessionStorage.getItem(INTERNET_FAST_STORAGE);
557
- if(["true", "false"].includes(isFast)) {
558
- return Promise.resolve(isFast === "true");
559
- }
560
-
561
- // Run download testing
562
555
  try {
556
+ // Check if test has been done before and stored
557
+ const isFast = sessionStorage.getItem(INTERNET_FAST_STORAGE);
558
+ if(["true", "false"].includes(isFast)) {
559
+ return Promise.resolve(isFast === "true");
560
+ }
561
+
562
+ // Run download testing
563
563
  const startTime = (new Date()).getTime();
564
564
  return fetch(INTERNET_FAST_TESTFILE+"?nocache="+startTime)
565
565
  .then(async res => [res, await res.blob()])
@@ -577,7 +577,7 @@ export function isInternetFast() {
577
577
  return false;
578
578
  });
579
579
  }
580
- // Fallback for browser blocking third-party downloads
580
+ // Fallback for browser blocking third-party downloads or sessionStorage
581
581
  catch(e) {
582
582
  return Promise.resolve(false);
583
583
  }