Skip to content

Commit de1e8ef

Browse files
authored
fix module names in "Could not load XY" exceptions (#2906)
1 parent bc6c640 commit de1e8ef

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/modules/html.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ import { globalObject } from "../libs/globalObject.js";
4848
}
4949
});
5050
}
51-
return Promise.reject(new Error("Could not load " + name));
51+
return Promise.reject(new Error("Could not load html2canvas"));
5252
// @endif
5353
})()
5454
.catch(function(e) {
55-
return Promise.reject(new Error("Could not load dompurify: " + e));
55+
return Promise.reject(new Error("Could not load html2canvas: " + e));
5656
})
5757
.then(function(html2canvas) {
5858
return html2canvas.default ? html2canvas.default : html2canvas;
@@ -88,7 +88,7 @@ import { globalObject } from "../libs/globalObject.js";
8888
}
8989
});
9090
}
91-
return Promise.reject(new Error("Could not load " + name));
91+
return Promise.reject(new Error("Could not load dompurify"));
9292
// @endif
9393
})()
9494
.catch(function(e) {

src/modules/svg.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ import { globalObject } from "../libs/globalObject.js";
6464
}
6565
});
6666
}
67-
return Promise.reject(new Error("Could not load " + name));
67+
return Promise.reject(new Error("Could not load canvg"));
6868
// @endif
6969
})()
7070
.catch(function(e) {
71-
return Promise.reject(new Error("Could not load dompurify: " + e));
71+
return Promise.reject(new Error("Could not load canvg: " + e));
7272
})
7373
.then(function(canvg) {
7474
return canvg.default ? canvg.default : canvg;

0 commit comments

Comments
 (0)