Remove main page toggle check

This is redundant.
page.getLeadSectionElement() will return null if the main page
is special casing and sections have not been wrapped.

Removing this check also allows toggling to work on pages where
users want to treat main pages like any other page.

Bug: T177337
Change-Id: Ic52fd1c9f6cc4f727ca52c871f29c76997e47f1d
This commit is contained in:
jdlrobson 2018-02-07 09:10:47 -08:00
parent 211a53fb67
commit b0970a4a7e

View file

@ -37,7 +37,6 @@
// avoid this running on Watchlist
if (
!page.inNamespace( 'special' ) &&
!mw.config.get( 'wgIsMainPage' ) &&
mw.config.get( 'wgAction' ) === 'view'
) {
init( $contentContainer, 'content-', page );