From eae458801fbf007d334fd3fd50f4c249303b408d Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 23 Jun 2016 17:43:17 +0200 Subject: [PATCH] CrossWikiUnreadFilterWidget: Remove unused this.localSource This also means PageFilterWidget can stop worrying about being given a nonexistent source. Change-Id: Id999a117c66d0600a4386713c98501cc5ed4236a --- modules/ui/mw.echo.ui.CrossWikiUnreadFilterWidget.js | 9 --------- modules/ui/mw.echo.ui.PageFilterWidget.js | 3 --- 2 files changed, 12 deletions(-) diff --git a/modules/ui/mw.echo.ui.CrossWikiUnreadFilterWidget.js b/modules/ui/mw.echo.ui.CrossWikiUnreadFilterWidget.js index a3d6bc28d..c0a2ce16d 100644 --- a/modules/ui/mw.echo.ui.CrossWikiUnreadFilterWidget.js +++ b/modules/ui/mw.echo.ui.CrossWikiUnreadFilterWidget.js @@ -60,12 +60,6 @@ this.aggregate( { choose: 'pageFilterChoose' } ); this.connect( this, { pageFilterChoose: 'onPageFilterChoose' } ); - // Always have a local wiki - this.localSource = new mw.echo.ui.PageFilterWidget( - this.model.getSourcePagesModel(), - mw.config.get( 'wgDBname' ) - ); - this.$element .addClass( 'mw-echo-ui-crossWikiUnreadFilterWidget' ) .append( @@ -159,9 +153,6 @@ ); widgets.push( widget ); - if ( source !== mw.config.get( 'wgDBname' ) ) { - this.localSource = widget; - } } this.clearItems(); diff --git a/modules/ui/mw.echo.ui.PageFilterWidget.js b/modules/ui/mw.echo.ui.PageFilterWidget.js index c28ad7b62..ce3ef7909 100644 --- a/modules/ui/mw.echo.ui.PageFilterWidget.js +++ b/modules/ui/mw.echo.ui.PageFilterWidget.js @@ -75,9 +75,6 @@ optionWidgets = [], sourcePages = this.model.getSourcePages( this.source ); - if ( !sourcePages ) { - return; - } for ( i = 0; i < sourcePages.length; i++ ) { widget = new mw.echo.ui.PageNotificationsOptionWidget( { label: sourcePages[ i ].title,