RCFilters: Correct looking for items in namespace group
authorMoriel Schottlender <moriel@gmail.com>
Tue, 2 Jan 2018 18:29:03 +0000 (10:29 -0800)
committerMoriel Schottlender <moriel@gmail.com>
Tue, 2 Jan 2018 18:29:03 +0000 (10:29 -0800)
To look for the namespace items, we either search for things in the
'namesapces' view (plural) or the 'namespace' group (singular) so
the code had a typo. This is a recurring typo, but overall, it makes
more sense to look for items in the **group** of namespaces rather
than in the namespace view, conceptually.

Bug: T183910
Change-Id: Ic67a6f1afd3e95fe776fbc5c33ecb7af737055b4

resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js

index bbc1d7e..c9f5924 100644 (file)
        mw.rcfilters.dm.FiltersViewModel.prototype.areNamespacesEffectivelyInverted = function () {
                return this.getInvertModel().isSelected() &&
                        this.getSelectedItems().some( function ( itemModel ) {
-                               return itemModel.getGroupModel().getView() === 'namespace';
+                               return itemModel.getGroupModel().getName() === 'namespace';
                        } );
        };