Skip to content

Commit 7f33455

Browse files
author
Mishig Davaadorj
authored
Lint (#457)
1 parent cc692f5 commit 7f33455

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

widgets/src/lib/InferenceWidget/shared/ViewUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export function hexToRgb(hex: string): number[]{
151151
return hex.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i
152152
,(_, r, g, b) => '#' + r + r + g + g + b + b)
153153
.substring(1).match(/.{2}/g)
154-
.map(x => parseInt(x, 16))
154+
?.map(x => parseInt(x, 16)) || [0, 0, 0];
155155
}
156156

157157
/*

0 commit comments

Comments
 (0)