Skip to content

Commit

Permalink
fix: null backgroundColor option as transparent (#2012)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasvh authored Sep 22, 2019
1 parent 00555cf commit 7d3456b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7d3456b

Please sign in to comment.