Santhosh has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/335604 )
Change subject: Correct the section filtering function ...................................................................... Correct the section filtering function The return values were wrong for filter function Change-Id: I216834b3595cb865eb70eb59f45fe499954bf677 --- M modules/dm/mw.cx.dm.SourcePage.js 1 file changed, 5 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/04/335604/1 diff --git a/modules/dm/mw.cx.dm.SourcePage.js b/modules/dm/mw.cx.dm.SourcePage.js index 5b0964c..1e90bed 100644 --- a/modules/dm/mw.cx.dm.SourcePage.js +++ b/modules/dm/mw.cx.dm.SourcePage.js @@ -102,20 +102,16 @@ * @return {boolean} whether the section can be included or not. */ mw.cx.dm.SourcePage.prototype.filterSection = function ( section ) { - var self = this; - if ( section.tagName && mw.cx.dm.SourcePage.static.sectionTypes.indexOf( section.tagName.toLowerCase() ) >= 0 ) { + if ( $( section ).is( this.config.removableSections.join( ', ' ) ) || + $( section ).children().is( this.config.removableSections.join( ', ' ) ) + ) { + return false; + } return true; } - - if ( $( section ).is( self.config.removableSections.join( ', ' ) ) || - $( section ).children().is( self.config.removableSections.join( ', ' ) ) - ) { - return true; - } - return false; }; -- To view, visit https://gerrit.wikimedia.org/r/335604 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I216834b3595cb865eb70eb59f45fe499954bf677 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits