Skip to content

Commit

Permalink
Fix for tsayen#220
Browse files Browse the repository at this point in the history
  • Loading branch information
goodforenergy committed Sep 11, 2018
1 parent a10a4bb commit 23fbdd7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/dom-to-image.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/dom-to-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,10 @@
copyStyle(window.getComputedStyle(original), clone.style);

function copyStyle(source, target) {
if (source.cssText) target.cssText = source.cssText;
else copyProperties(source, target);
if (source.cssText) {
target.cssText = source.cssText;
target.font = source.font; // here, we re-assign the font prop.
} else copyProperties(source, target);

function copyProperties(source, target) {
util.asArray(source).forEach(function (name) {
Expand Down

0 comments on commit 23fbdd7

Please sign in to comment.