From 20e3bbd28ffb7dd2aa00da711d8a64d6a49aa99b Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Mon, 9 Jul 2018 14:31:46 -0700 Subject: [PATCH] Don't render blank issues If an extracted issue has no text, do not render it Bug: T199005 Change-Id: I18047492e891285ed3af113200d2909e178b8224 --- resources/skins.minerva.scripts/cleanuptemplates.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/skins.minerva.scripts/cleanuptemplates.js b/resources/skins.minerva.scripts/cleanuptemplates.js index 18ec12d..42819d6 100644 --- a/resources/skins.minerva.scripts/cleanuptemplates.js +++ b/resources/skins.minerva.scripts/cleanuptemplates.js @@ -81,7 +81,12 @@ if ( $this.find( selector ).length === 0 ) { issue = extractMessage( $this ); - issues.push( issue ); + // Some issues after "extractMessage" has been run will have no text. + // For example in Template:Talk header the table will be removed and no issue found. + // These should not be rendered. + if ( issue.text ) { + issues.push( issue ); + } } } );