diff --git a/src/js/_enqueues/wp/customize/controls.js b/src/js/_enqueues/wp/customize/controls.js
index 1d402bc1c3..2686e476e7 100644
|
a
|
b
|
|
| 2105 | 2105 | request.done(function( data ) { |
| 2106 | 2106 | var themes = data.themes; |
| 2107 | 2107 | |
| | 2108 | if ( section.tagEmpty ) { |
| | 2109 | section.tagEmpty = false; |
| | 2110 | section.loading = false; |
| | 2111 | section.tags = ''; |
| | 2112 | section.loadThemes(); |
| | 2113 | return; |
| | 2114 | } |
| 2108 | 2115 | // Stop and try again if the term changed while loading. |
| 2109 | 2116 | if ( '' !== section.nextTerm || '' !== section.nextTags ) { |
| 2110 | 2117 | if ( section.nextTerm ) { |
| … |
… |
|
| 2324 | 2331 | if ( ! _.isEqual( section.tags, tags ) ) { |
| 2325 | 2332 | if ( section.loading ) { |
| 2326 | 2333 | section.nextTags = tags; |
| | 2334 | if ( 0 === tags.length ) { |
| | 2335 | section.tagEmpty = true; |
| | 2336 | } |
| 2327 | 2337 | } else { |
| 2328 | 2338 | if ( 'remote' === section.params.filter_type ) { |
| 2329 | 2339 | section.initializeNewQuery( section.term, tags ); |
| … |
… |
|
| 2361 | 2371 | section.tags = newTags; |
| 2362 | 2372 | section.loadThemes(); |
| 2363 | 2373 | } else { |
| | 2374 | section.tagEmpty = true; |
| 2364 | 2375 | section.nextTerm = newTerm; // This will reload from loadThemes() with the newest term once the current batch is loaded. |
| 2365 | 2376 | section.nextTags = newTags; // This will reload from loadThemes() with the newest tags once the current batch is loaded. |
| 2366 | 2377 | } |