Skip to content

Commit bdf1e8f

Browse files
committed
fix: transparent bg
1 parent a88ce5e commit bdf1e8f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/screenshot/src/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,15 @@ const hideElements = elements => {
101101
}
102102
}
103103

104-
const createSvgBackground = css =>
105-
Buffer.from(svgGradient(css, { width: '1388px', height: '955px' }))
104+
const createSvgBackground = css => svgGradient(css, { width: '1388px', height: '955px' })
106105

107106
const getBackground = async (bg = 'transparent') => {
108107
if (isHttpUrl(bg)) {
109108
const { body } = await got(bg, { encoding: null })
110109
return body
111110
}
112111

113-
if (bg !== 'transparent' && !bg.includes('gradient')) {
112+
if (!bg.includes('gradient')) {
114113
bg = `linear-gradient(45deg, ${bg} 0%, ${bg} 100%)`
115114
}
116115

0 commit comments

Comments
 (0)