Skip to content

Commit 0867b62

Browse files
committed
Fix #746 text component color resetting to black
1 parent d3f6ef3 commit 0867b62

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/app/components/TextComponent.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ function visitComponent(component: unknown, consumer: (c: PartData) => void) {
7272
}
7373
}
7474

75-
function inherit(component: object, base: PartData) {
75+
function inherit(component: any, base: PartData) {
7676
return {
77-
color: base.color,
78-
bold: base.bold,
79-
italic: base.italic,
80-
underlined: base.underlined,
81-
strikethrough: base.strikethrough,
8277
...component,
78+
color: component.color ?? base.color,
79+
bold: component.bold ?? base.bold,
80+
italic: component.italic ?? base.italic,
81+
underlined: component.underlined ?? base.underlined,
82+
strikethrough: component.strikethrough ?? base.strikethrough,
8383
}
8484
}
8585

0 commit comments

Comments
 (0)