|
|
@@ -160,15 +160,17 @@ this.docHelper = this.docHelper || (() => {
|
|
|
if (tagName == "img") {
|
|
|
imageElement = element;
|
|
|
}
|
|
|
- imageData.source = {
|
|
|
- clientWidth: imageElement.clientWidth,
|
|
|
- clientHeight: imageElement.clientHeight,
|
|
|
- naturalWidth: imageElement.naturalWidth,
|
|
|
- naturalHeight: imageElement.naturalHeight,
|
|
|
- width: imageElement.width,
|
|
|
- height: imageElement.height,
|
|
|
- src: (!imageElement.currentSrc.startsWith("data:") && imageElement.currentSrc) || (!imageElement.src.startsWith("data:") && imageElement.src)
|
|
|
- };
|
|
|
+ if (imageElement) {
|
|
|
+ imageData.source = {
|
|
|
+ clientWidth: imageElement.clientWidth,
|
|
|
+ clientHeight: imageElement.clientHeight,
|
|
|
+ naturalWidth: imageElement.naturalWidth,
|
|
|
+ naturalHeight: imageElement.naturalHeight,
|
|
|
+ width: imageElement.width,
|
|
|
+ height: imageElement.height,
|
|
|
+ src: (!imageElement.currentSrc.startsWith("data:") && imageElement.currentSrc) || (!imageElement.src.startsWith("data:") && imageElement.src)
|
|
|
+ };
|
|
|
+ }
|
|
|
data.push(imageData);
|
|
|
});
|
|
|
return data;
|