]> _ Git - fluidbook-html5.git/commitdiff
wip #7099 @0:20
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 26 Sep 2024 09:20:28 +0000 (11:20 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 26 Sep 2024 09:20:28 +0000 (11:20 +0200)
js/libs/fluidbook/fluidbook.support.js

index 783c9d174812795eee37ff137463f571300c0e31..cd743884eb28ae62c17ca4cbc32bd9153d77b2ee 100644 (file)
@@ -14,8 +14,14 @@ function FluidbookSupport(fluidbook) {
     this.iOS = Modernizr.ios;
     this.edge = Modernizr.edge;
     this.chromeBased = Modernizr.chrome || this.edge;
-    this.gpuInfos = this.getGPUInfos();
-    this.svgtocanvas = this.fluidbook.settings.svgToCanvas == 1 && this.IE === 0 && !(this.safari && this.macOs) && this.getGPUInfos().vendor.indexOf('intel') === -1 && this.getGPUInfos().vendor.indexOf('renderer') === -1;
+
+    try {
+        this.gpuInfos = this.getGPUInfos();
+        this.svgtocanvas = this.fluidbook.settings.svgToCanvas == 1 && this.IE === 0 && !(this.safari && this.macOs) && this.getGPUInfos().vendor.indexOf('intel') === -1 && this.getGPUInfos().vendor.indexOf('renderer') === -1;
+    } catch (e) {
+        this.svgtocanvas = false;
+    }
+
     this.pdftocanvas = window.pdfjsLib !== undefined && this.fluidbook.settings.svgToCanvas == 2;
 
     // If in node-webkit or if the index.html fluidbook is locally open in a browser