Pages that do not exist cannot have issues

Bug: T185359
Change-Id: I4d2adcd31d31761c178cbb8df8db696f654a795d
This commit is contained in:
jdlrobson 2018-02-07 14:33:19 -08:00 committed by Jdlrobson
parent 437ff0ccba
commit 6ab5944b09

View file

@ -2,6 +2,7 @@
( function () {
var action = mw.config.get( 'wgAction' ),
page = M.getCurrentPage(),
overlayManager = M.require( 'skins.minerva.scripts/overlayManager' ),
CleanupOverlay = M.require( 'mobile.issues/CleanupOverlay' );
@ -99,7 +100,7 @@
var ns = mw.config.get( 'wgNamespaceNumber' ),
// Categories have no lead section
$container = ns === 14 ? $( '#bodyContent' ) :
M.getCurrentPage().getLeadSectionElement();
page.getLeadSectionElement();
if ( action === 'edit' ) {
$container = $( '#mw-content-text' );
@ -124,7 +125,10 @@
}
// Setup the issues banner on the page
initPageIssues();
// Pages which dont exist (id 0) cannot have issues
if ( !page.isMissing ) {
initPageIssues();
}
}() );
}( mw.mobileFrontend, jQuery ) );