Skip to content

Commit 2813aaa

Browse files
committed
Fix: canvas style props, closes #63
1 parent 1a9f535 commit 2813aaa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/core/clone.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ export function deepClone(node, styleMap, styleCache, nodeMap, compress) {
4545
img.width = node.width;
4646
img.height = node.height;
4747
img.style.display = "inline-block";
48-
img.style.width = `${node.width}px`;
49-
img.style.height = `${node.height}px`;
48+
img.style.width = node.style.width || `${node.width}px`;
49+
img.style.height = node.style.height || `${node.height}px`;
5050
return img;
5151
}
5252
if (node.nodeType === Node.TEXT_NODE) {

0 commit comments

Comments
 (0)