Skip to content

Commit 9955f71

Browse files
authored
fix(support-bot): use default box colors instead of missing halloween colors (#794)
1 parent a2e7e7d commit 9955f71

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

apps/discord-bot/src/themes/boxes/hd.box.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ export const render: Render<Box.BoxRenderProps> = (
2121
{ x, y, width, height, padding },
2222
{ boxColorFill }
2323
) => {
24-
const fill = Box.resolveFill(color === Box.DEFAULT_COLOR ? boxColorFill : color, ctx, x, y, width, height);
24+
const fill = Box.resolveFill(
25+
color === Box.DEFAULT_COLOR && boxColorFill ? boxColorFill : color,
26+
ctx,
27+
x, y,
28+
width, height
29+
);
2530
ctx.fillStyle = fill;
2631

2732
width = width + padding.left + padding.right;

apps/discord-bot/src/themes/boxes/uhd.box.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ export const render: Render<Box.BoxRenderProps> = (
2121
{ x, y, width, height, padding },
2222
{ boxColorFill }
2323
) => {
24-
const fill = Box.resolveFill(color === Box.DEFAULT_COLOR ? boxColorFill : color, ctx, x, y, width, height);
24+
const fill = Box.resolveFill(
25+
color === Box.DEFAULT_COLOR && boxColorFill ? boxColorFill : color,
26+
ctx,
27+
x, y,
28+
width, height
29+
);
2530
ctx.fillStyle = fill;
2631

2732
width = width + padding.left + padding.right;

packages/rendering/src/intrinsics/Box.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export const render: JSX.Render<BoxRenderProps> = (
115115
{ x, y, width, height, padding },
116116
{ boxColorFill }
117117
) => {
118-
const fill = resolveFill(color === DEFAULT_COLOR ? boxColorFill : color, ctx, x, y, width, height);
118+
const fill = resolveFill(color === DEFAULT_COLOR && boxColorFill ? boxColorFill : color, ctx, x, y, width, height);
119119
ctx.fillStyle = fill;
120120

121121
width = width + padding.left + padding.right;

0 commit comments

Comments
 (0)