Skip to content

Commit b10cc27

Browse files
committed
format & lint
1 parent 98c6d32 commit b10cc27

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

src/dom-to-image-more.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
const fontFaces = newFontFaces();
77
const images = newImages();
88
const offscreen = {
9-
position: "fixed",
10-
left: "-9999px",
11-
visibility: "hidden",
12-
}
9+
position: 'fixed',
10+
left: '-9999px',
11+
visibility: 'hidden',
12+
};
1313
// Default impl options
1414
const defaultOptions = {
1515
// Default is to copy default styles of elements
@@ -48,7 +48,7 @@
4848
inliner: inliner,
4949
urlCache: [],
5050
options: {},
51-
copyOptions: copyOptions
51+
copyOptions: copyOptions,
5252
},
5353
};
5454

@@ -474,8 +474,7 @@
474474
});
475475

476476
function fixResponsiveImages() {
477-
if (util.isHTMLImageElement(clone))
478-
{
477+
if (util.isHTMLImageElement(clone)) {
479478
// Remove lazy-loading and responsive attributes
480479
clone.removeAttribute('loading');
481480

@@ -844,7 +843,7 @@
844843
};
845844

846845
svg.appendChild(image);
847-
svg.style = {...svg.style, ...offscreen};
846+
svg.style = { ...svg.style, ...offscreen };
848847
image.src = uri;
849848

850849
// Add the SVG to the document body (invisible)
@@ -882,7 +881,8 @@
882881
const status = xhr.status;
883882
// In local files, status is 0 upon success in Mozilla Firefox
884883
if (
885-
(status === 0 && url.toLowerCase().startsWith('file://')) ||
884+
(status === 0 &&
885+
url.toLowerCase().startsWith('file://')) ||
886886
(status >= 200 && status <= 300 && xhr.response !== null)
887887
) {
888888
const response = xhr.response;
@@ -922,7 +922,12 @@
922922
if (placeholder) {
923923
resolve(placeholder);
924924
} else {
925-
fail('Status:' + xhr.status + ' while fetching resource: ' + url);
925+
fail(
926+
'Status:' +
927+
xhr.status +
928+
' while fetching resource: ' +
929+
url
930+
);
926931
}
927932
}
928933

0 commit comments

Comments
 (0)