Merge "RCFilters: Update URL even when we skip fetching"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 22 Nov 2017 17:22:36 +0000 (17:22 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 22 Nov 2017 17:22:36 +0000 (17:22 +0000)
resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js

index 5386291..0cec3ff 100644 (file)
         * Reset to default filters
         */
        mw.rcfilters.Controller.prototype.resetToDefaults = function () {
-               if ( this.applyParamChange( this._getDefaultParams() ) ) {
+               var params = this._getDefaultParams();
+               if ( this.applyParamChange( params ) ) {
                        // Only update the changes list if there was a change to actual filters
                        this.updateChangesList();
+               } else {
+                       this.uriProcessor.updateURL( params );
                }
        };
 
                if ( this.applyParamChange( {} ) ) {
                        // Only update the changes list if there was a change to actual filters
                        this.updateChangesList();
+               } else {
+                       this.uriProcessor.updateURL();
                }
 
                if ( highlightedFilterNames ) {
                if ( this.applyParamChange( params ) ) {
                        // Update changes list only if there was a difference in filter selection
                        this.updateChangesList();
+               } else {
+                       this.uriProcessor.updateURL( params );
                }
 
                // Log filter grouping