Skip to content

Commit

Permalink
fix: add defaults to rgbColor arg (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles authored Mar 14, 2024
1 parent e7e8953 commit de28882
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 4 additions & 2 deletions package-lock.json

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

4 changes: 1 addition & 3 deletions src/hast/common/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ const isParagraphBorder = (
};

export const rgbColor = ({
color: {
rgbColor: { red = 0, green = 0, blue = 0 },
},
color: { rgbColor: { red = 0, green = 0, blue = 0 } = {} } = {},
}: docs_v1.Schema$OptionalColor): string => {
return `rgb(${red * 255}, ${green * 255}, ${blue * 255})`;
};
Expand Down

0 comments on commit de28882

Please sign in to comment.