Skip to content

Commit

Permalink
Save deleted and restored widgets. (#32534)
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines authored and youknowriad committed Jun 14, 2021
1 parent b7c2129 commit 74190f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/edit-widgets/src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ export function* saveWidgetArea( widgetAreaId ) {
// since order is important.
sidebarWidgetsIds.push( widgetId );

if ( widgetId ) {
// We need to check for the id in the widget object here, because a deleted
// and restored widget won't have this id.
if ( widget.id ) {
yield dispatch(
'core',
'editEntityRecord',
Expand Down

0 comments on commit 74190f8

Please sign in to comment.