From 5d588b99236041ac32f92960a6695edbf77d1b14 Mon Sep 17 00:00:00 2001 From: theopolisme Date: Wed, 26 Feb 2014 21:40:44 -0600 Subject: [PATCH] Die if reviewing a nonexistent page --- src/modules/submissions.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/submissions.js b/src/modules/submissions.js index 8518212..b39a1f0 100644 --- a/src/modules/submissions.js +++ b/src/modules/submissions.js @@ -3,7 +3,10 @@ var $afchLaunchLink, $afch, $afchWrapper, afchPage, afchSubmission, afchViews, afchViewer; - AFCH.log( 'submissions.js executing...' ); + // Die if reviewing a nonexistent page + if ( mw.config.get( 'wgArticleId' ) === 0 ) { + return; + } /** * Represents an AfC submission -- its status as well as comments.