Make sure the title in AddWidget is never empty
Signed-off-by: ivgo <ivgo@spreadgroup.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-home': patch
|
||||
---
|
||||
|
||||
Make sure the widget name is never empty in the `AddWidgetDialog`. If the title was set to "", the entry would contain an empty string. Use the name as a fallback
|
||||
@@ -29,7 +29,7 @@ interface AddWidgetDialogProps {
|
||||
}
|
||||
|
||||
const getTitle = (widget: Widget) => {
|
||||
return widget.title ?? widget.name;
|
||||
return widget.title || widget.name;
|
||||
};
|
||||
|
||||
export const AddWidgetDialog = (props: AddWidgetDialogProps) => {
|
||||
|
||||
Reference in New Issue
Block a user