Make WordPress Core

Ticket #62681: 62681.patch

File 62681.patch, 1.3 KB (added by parthvataliya, 5 weeks ago)

This patch resolves the issue.

  • src/js/_enqueues/wp/customize/controls.js

    diff --git a/src/js/_enqueues/wp/customize/controls.js b/src/js/_enqueues/wp/customize/controls.js
    index 1d402bc1c3..2686e476e7 100644
    a b  
    21052105                        request.done(function( data ) {
    21062106                                var themes = data.themes;
    21072107
     2108                                if ( section.tagEmpty ) {
     2109                                        section.tagEmpty = false;
     2110                                        section.loading = false;
     2111                                        section.tags = '';
     2112                                        section.loadThemes();
     2113                                        return;
     2114                                }
    21082115                                // Stop and try again if the term changed while loading.
    21092116                                if ( '' !== section.nextTerm || '' !== section.nextTags ) {
    21102117                                        if ( section.nextTerm ) {
     
    23242331                        if ( ! _.isEqual( section.tags, tags ) ) {
    23252332                                if ( section.loading ) {
    23262333                                        section.nextTags = tags;
     2334                                        if ( 0 === tags.length ) {
     2335                                                section.tagEmpty = true;
     2336                                        }
    23272337                                } else {
    23282338                                        if ( 'remote' === section.params.filter_type ) {
    23292339                                                section.initializeNewQuery( section.term, tags );
     
    23612371                                section.tags = newTags;
    23622372                                section.loadThemes();
    23632373                        } else {
     2374                                section.tagEmpty = true;
    23642375                                section.nextTerm = newTerm; // This will reload from loadThemes() with the newest term once the current batch is loaded.
    23652376                                section.nextTags = newTags; // This will reload from loadThemes() with the newest tags once the current batch is loaded.
    23662377                        }