X Tutup
Skip to content

Commit 7e16a8c

Browse files
committed
fix parseCSS argument type when passing a #RRGGBB string value
1 parent e6082c6 commit 7e16a8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/melonjs/src/math/color.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,8 @@ export class Color {
547547
* @param cssColor - The CSS color name
548548
* @returns Reference to this object for method chaining
549549
*/
550-
parseCSS(cssColor: ColorName) {
551-
const rgb = cssToRGB.get(cssColor);
550+
parseCSS(cssColor: string) {
551+
const rgb = cssToRGB.get(cssColor as ColorName);
552552
if (!rgb) {
553553
return this.parseRGB(cssColor);
554554
}

0 commit comments

Comments
 (0)
X Tutup