|
|
@@ -162,8 +162,8 @@ this.docHelper = this.docHelper || (() => {
|
|
|
imageElement.setAttribute(imagesAttributeName(options.sessionId), imageElementIndex);
|
|
|
let imageData;
|
|
|
const computedStyle = getComputedStyle(imageElement);
|
|
|
- const paddingIsSet = computedStyle.padding != "0px";
|
|
|
- const marginIsSet = computedStyle.margin != "0px";
|
|
|
+ const paddingIsSet = computedStyle.padding && computedStyle.padding != "0px";
|
|
|
+ const marginIsSet = computedStyle.margin && computedStyle.margin != "0px";
|
|
|
if (imageElement.src && !paddingIsSet && !marginIsSet) {
|
|
|
let naturalWidth = imageElement.naturalWidth;
|
|
|
let naturalHeight = imageElement.naturalHeight;
|