allow widget name to be empty string in update

This commit is contained in:
Sonja Happ 2021-10-25 11:02:38 +02:00
parent 56f05e97f7
commit 96572c35b1

View file

@ -103,11 +103,7 @@ func (r *addWidgetRequest) createWidget() Widget {
func (r *updateWidgetRequest) updatedWidget(oldWidget Widget) Widget {
// Use the old Widget as a basis for the updated Widget `s`
s := oldWidget
if r.Widget.Name != "" {
s.Name = r.Widget.Name
}
s.Name = r.Widget.Name
s.Type = r.Widget.Type
s.Width = r.Widget.Width
s.Height = r.Widget.Height