From 91a7d30b929d6aaacffd4a5f5f2f256c3dbac48c Mon Sep 17 00:00:00 2001 From: Lukas Hollaender Date: Tue, 8 Sep 2020 14:03:27 +0200 Subject: [PATCH] fix module names in "Could not load XY" exceptions --- src/modules/html.js | 6 +++--- src/modules/svg.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/html.js b/src/modules/html.js index ab1a6ee71..5fff1aaf4 100644 --- a/src/modules/html.js +++ b/src/modules/html.js @@ -48,11 +48,11 @@ import { globalObject } from "../libs/globalObject.js"; } }); } - return Promise.reject(new Error("Could not load " + name)); + return Promise.reject(new Error("Could not load html2canvas")); // @endif })() .catch(function(e) { - return Promise.reject(new Error("Could not load dompurify: " + e)); + return Promise.reject(new Error("Could not load html2canvas: " + e)); }) .then(function(html2canvas) { return html2canvas.default ? html2canvas.default : html2canvas; @@ -88,7 +88,7 @@ import { globalObject } from "../libs/globalObject.js"; } }); } - return Promise.reject(new Error("Could not load " + name)); + return Promise.reject(new Error("Could not load dompurify")); // @endif })() .catch(function(e) { diff --git a/src/modules/svg.js b/src/modules/svg.js index cbd6a64eb..333f59171 100644 --- a/src/modules/svg.js +++ b/src/modules/svg.js @@ -64,11 +64,11 @@ import { globalObject } from "../libs/globalObject.js"; } }); } - return Promise.reject(new Error("Could not load " + name)); + return Promise.reject(new Error("Could not load canvg")); // @endif })() .catch(function(e) { - return Promise.reject(new Error("Could not load dompurify: " + e)); + return Promise.reject(new Error("Could not load canvg: " + e)); }) .then(function(canvg) { return canvg.default ? canvg.default : canvg;