From 2b363541ae1ad6955e9d90ac929c2f5e9f8de148 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 10 Jul 2018 10:56:53 -0700 Subject: [PATCH] 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 --- .../src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ItemModel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 */ -- 2.20.1