Skip to content

Commit fccf98d

Browse files
committed
fix(colors): overload workflowBorderColor to accept string | undefined
1 parent 4e1fa16 commit fccf98d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/sim/lib/workspaces/colors.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ function withAlpha(hexColor: string, alpha: number): string {
8383
* @param color - A hex color string (e.g. `#2ABBF8`)
8484
* @returns The color string with `60` appended as the hex alpha channel
8585
*/
86-
export function workflowBorderColor(color: string): string {
87-
return `${color}60`
86+
export function workflowBorderColor(color: string): string
87+
export function workflowBorderColor(color: string | undefined): string | undefined
88+
export function workflowBorderColor(color: string | undefined): string | undefined {
89+
return color ? `${color}60` : undefined
8890
}
8991

9092
function buildGradient(fromColor: string, toColor: string, rotationSeed: number): string {

0 commit comments

Comments
 (0)