mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Fix #746 text component color resetting to black
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user