From: Roan Kattouw Date: Tue, 10 Jul 2018 17:56:53 +0000 (-0700) Subject: RCFilters: Explicitly set the default highlight color to null X-Git-Tag: 1.34.0-rc.0~4812^2 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=2b363541ae1ad6955e9d90ac929c2f5e9f8de148;p=lhc%2Fweb%2Fwiklou.git RCFilters: Explicitly set the default highlight color to null Other code checks !== null on this, and since undefined !== null, it will incorrectly think a highlight color is set when it's not. Bug: T199144 Change-Id: I5dbe95ff3c2a5e9c4597a1794a0d3256b671238f --- diff --git a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ItemModel.js b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ItemModel.js index fef52264e4..63b0b0321c 100644 --- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ItemModel.js +++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ItemModel.js @@ -20,7 +20,7 @@ * @cfg {string} [cssClass] The class identifying the results that match this filter * @cfg {string[]} [identifiers] An array of identifiers for this item. They will be * added and considered in the view. - * @cfg {string} [defaultHighlightColor] If set, highlight this filter by default with this color + * @cfg {string} [defaultHighlightColor=null] If set, highlight this filter by default with this color */ mw.rcfilters.dm.ItemModel = function MwRcfiltersDmItemModel( param, config ) { config = config || {}; @@ -41,7 +41,7 @@ // Highlight this.cssClass = config.cssClass; - this.highlightColor = config.defaultHighlightColor; + this.highlightColor = config.defaultHighlightColor || null; }; /* Initialization */