diff --git a/src/wp-admin/js/customize-nav-menus.js b/src/wp-admin/js/customize-nav-menus.js
index 9cd39c96f6..893dd42232 100644
a
|
b
|
|
2852 | 2852 | var insertedMenuIdMapping = {}, insertedMenuItemIdMapping = {}; |
2853 | 2853 | |
2854 | 2854 | _( data.nav_menu_updates ).each(function( update ) { |
2855 | | var oldCustomizeId, newCustomizeId, customizeId, oldSetting, newSetting, setting, settingValue, oldSection, newSection, wasSaved, widgetTemplate, navMenuCount; |
| 2855 | var oldCustomizeId, newCustomizeId, customizeId, oldSetting, newSetting, setting, settingValue, oldSection, newSection, wasSaved, widgetTemplate, navMenuCount, shouldExpandNewSection; |
2856 | 2856 | if ( 'inserted' === update.status ) { |
2857 | 2857 | if ( ! update.previous_term_id ) { |
2858 | 2858 | throw new Error( 'Expected previous_term_id' ); |
… |
… |
|
2884 | 2884 | previewer: api.previewer |
2885 | 2885 | } ); |
2886 | 2886 | |
2887 | | if ( oldSection.expanded() ) { |
| 2887 | shouldExpandNewSection = oldSection.expanded(); |
| 2888 | if ( shouldExpandNewSection ) { |
2888 | 2889 | oldSection.collapse(); |
2889 | 2890 | } |
2890 | 2891 | |
… |
… |
|
2959 | 2960 | } |
2960 | 2961 | } ); |
2961 | 2962 | |
2962 | | if ( oldSection.expanded.get() ) { |
2963 | | // @todo This doesn't seem to be working. |
| 2963 | if ( shouldExpandNewSection ) { |
2964 | 2964 | newSection.expand(); |
2965 | 2965 | } |
2966 | 2966 | } else if ( 'updated' === update.status ) { |