Fix #746 text component color resetting to black

This commit is contained in:
Misode
2025-05-17 21:19:46 +02:00
parent d3f6ef313c
commit 0867b629ec

View File

@@ -72,14 +72,14 @@ function visitComponent(component: unknown, consumer: (c: PartData) => void) {
}
}
function inherit(component: object, base: PartData) {
function inherit(component: any, base: PartData) {
return {
color: base.color,
bold: base.bold,
italic: base.italic,
underlined: base.underlined,
strikethrough: base.strikethrough,
...component,
color: component.color ?? base.color,
bold: component.bold ?? base.bold,
italic: component.italic ?? base.italic,
underlined: component.underlined ?? base.underlined,
strikethrough: component.strikethrough ?? base.strikethrough,
}
}