Remove dead code for allowUnknownTags checking

When tagDef is falsey the previous if block is entered and the function
always returns.  Therefore, this code block can never be entered.  If it
could, it would log the same error as above.  Remove it.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
This commit is contained in:
Kevin Locke 2016-02-24 11:36:35 -08:00
parent 3dbb94f157
commit 2a4d1250d1

View File

@ -37,10 +37,7 @@ exports.validate = function(tag, tagDef, meta) {
}
// check for errors that make the tag useless
if (!tagDef && !env.conf.tags.allowUnknownTags) {
logger.error( buildMessage(tag.title, meta, 'is not a known tag') );
}
else if (!tag.text && tagDef.mustHaveValue) {
if (!tag.text && tagDef.mustHaveValue) {
logger.error( buildMessage(tag.title, meta, 'requires a value') );
}