more detail msg if error loading image
This commit is contained in:
@@ -649,8 +649,8 @@ export const embedImage = function (src) {
|
|||||||
svgContext_.getCanvas().setGoodImage(src);
|
svgContext_.getCanvas().setGoodImage(src);
|
||||||
resolve(svgContext_.getEncodableImages(src));
|
resolve(svgContext_.getEncodableImages(src));
|
||||||
});
|
});
|
||||||
imgI.addEventListener("error", () => {
|
imgI.addEventListener("error", (e) => {
|
||||||
reject(new Error('Error loading image: '));
|
reject(new Error(`error loading image: ${e.currentTarget.attributes.src.value}`));
|
||||||
});
|
});
|
||||||
imgI.setAttribute('src', src);
|
imgI.setAttribute('src', src);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user