mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
fix: null backgroundColor option as transparent (#2012)
This commit is contained in:
parent
00555cf1ef
commit
7d3456b78c
@ -101,7 +101,7 @@ const renderElement = async (element: HTMLElement, opts: Partial<Options>): Prom
|
||||
: COLORS.TRANSPARENT;
|
||||
|
||||
const bgColor = opts.backgroundColor;
|
||||
const defaultBackgroundColor = typeof bgColor === 'string' ? parseColor(bgColor) : 0xffffffff;
|
||||
const defaultBackgroundColor = typeof bgColor === 'string' ? parseColor(bgColor) : bgColor === null ? COLORS.TRANSPARENT : 0xffffffff;
|
||||
|
||||
const backgroundColor =
|
||||
element === ownerDocument.documentElement
|
||||
|
Loading…
Reference in New Issue
Block a user