Skip to content

Commit

Permalink
Fix #2505
Browse files Browse the repository at this point in the history
  • Loading branch information
JiuqingSong committed Mar 28, 2024
1 parent ee44e54 commit 7003c8e
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 7003c8e

Please sign in to comment.