Skip to content

Commit a371834

Browse files
fix: when changing depth set child menu parent to 0 if it doesn't exist
1 parent 11ba0dd commit a371834

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/js/_enqueues/wp/customize/nav-menus.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2422,6 +2422,11 @@
24222422

24232423
parentControl = api.control( 'nav_menu_item[' + settingValue.menu_item_parent + ']' );
24242424
if ( ! parentControl ) {
2425+
control.setting.set(
2426+
$.extend({}, control.setting(), {
2427+
menu_item_parent: 0,
2428+
})
2429+
);
24252430
return;
24262431
}
24272432

0 commit comments

Comments
 (0)