diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js index eafd735424..ec2760c159 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.init.js @@ -53,13 +53,12 @@ conf = mw.config.get( 'wgVisualEditorConfig' ); uri = new mw.Uri(); - // For non-article pages, no information about page existence is exposed to + // For special pages, no information about page existence is exposed to // mw.config, so we assume it exists TODO: fix this in core. - pageExists = !!mw.config.get( 'wgArticleId' ) || !mw.config.get( 'wgIsArticle' ); + pageExists = !!mw.config.get( 'wgArticleId' ) || mw.config.get( 'wgNamespaceNumber' ) < 0; viewUri = new mw.Uri( mw.util.wikiGetlink( mw.config.get( 'wgRelevantPageName' ) ) ); veEditUri = viewUri.clone().extend( { 'veaction': 'edit' } ); isViewPage = ( - mw.config.get( 'wgAction' ) === 'view' && mw.config.get( 'wgIsArticle' ) && !( 'diff' in uri.query ) );