Fix getNamespace error
authorpetarpetkovic <ppetkovic@wikimedia.org>
Wed, 13 Dec 2017 14:29:25 +0000 (15:29 +0100)
committerpetarpetkovic <ppetkovic@wikimedia.org>
Wed, 13 Dec 2017 14:29:25 +0000 (15:29 +0100)
In mw.rcfilters.init file, getNamespace method is introduced in Id55702ecbe.
That method is invoked through 'this' context, which can be different
depending on how init method is invoked, which can lead to errors,
causing RCFilters not to render correctly.

Change-Id: Ifd9cb49e547077c622a5a3757361a85d99283f62

resources/src/mediawiki.rcfilters/mw.rcfilters.init.js

index 582d25f..63064d3 100644 (file)
@@ -94,7 +94,7 @@
                        controller.initialize(
                                mw.config.get( 'wgStructuredChangeFilters' ),
                                // All namespaces without Media namespace
-                               this.getNamespaces( [ 'Media' ] ),
+                               rcfilters.getNamespaces( [ 'Media' ] ),
                                mw.config.get( 'wgRCFiltersChangeTags' ),
                                conditionalViews
                        );