diff --git src/wp-includes/js/customize-preview-nav-menus.js src/wp-includes/js/customize-preview-nav-menus.js
index 3876e44..f1a5e38 100644
|
|
|
wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function(
|
| 15 | 15 | * Initialize nav menus preview. |
| 16 | 16 | */ |
| 17 | 17 | self.init = function() { |
| 18 | | var self = this; |
| | 18 | var self = this, synced = false; |
| | 19 | |
| | 20 | /* |
| | 21 | * Keep track of whether we synced to determine whether or not bindSettingListener |
| | 22 | * should also initially fire the listener. This initial firing needs to wait until |
| | 23 | * after all of the settings have been synced from the pane in order to prevent |
| | 24 | * an infinite selective fallback-refresh. |
| | 25 | */ |
| | 26 | api.preview.bind( 'sync', function() { |
| | 27 | synced = true; |
| | 28 | } ); |
| 19 | 29 | |
| 20 | 30 | if ( api.selectiveRefresh ) { |
| 21 | 31 | // Listen for changes to settings related to nav menus. |
| … |
… |
wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function(
|
| 32 | 42 | * this can trigger an infinite fallback refresh when the nav menu item lacks any valid items. |
| 33 | 43 | */ |
| 34 | 44 | if ( setting.get() && ! setting.get()._invalid ) { |
| 35 | | self.bindSettingListener( setting, { fire: true } ); |
| | 45 | self.bindSettingListener( setting, { fire: synced } ); |
| 36 | 46 | } |
| 37 | 47 | } ); |
| 38 | 48 | api.bind( 'remove', function( setting ) { |