Skip to content

Commit

Permalink
Fix #2505 (#2545)
Browse files Browse the repository at this point in the history
  • Loading branch information
JiuqingSong authored Mar 28, 2024
1 parent b777796 commit d4c503b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ export const TextColorFormatRenderer: FormatRenderer<TextColorFormat> = createCo
TextColorFormat
>(
'Text color',
format => (format.textColor ? Color(format.textColor).hex() : ''),
format => {
try {
return format.textColor ? Color(format.textColor).hex() : '';
} catch (e) {
console.log(e);
}
},
(format, value) => {
format.textColor = value;
return undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function TextFormatItem<T>(props: {
(newValue: string) => {
setValue(newValue);
setter?.(format, newValue);
onUpdate();
onUpdate?.();
},
[setter, format]
);
Expand Down

0 comments on commit d4c503b

Please sign in to comment.