diff --git a/lib/serialize/parseFunction.js b/lib/serialize/parseFunction.js index 0f0256b9..77fc89f9 100644 --- a/lib/serialize/parseFunction.js +++ b/lib/serialize/parseFunction.js @@ -335,11 +335,10 @@ module.exports = function parseFunction( replaceSuperExpression( trail, trailNodes, superVarNode, thisVarNode, superIsProto, internalVars, copyLoc ); - } else if (amendmentType === CONST_VIOLATION_SILENT) { - replaceConstViolation(trail, trailNodes, true, internalVars, copyLoc); } else { - // A non-silent const violation - replaceConstViolation(trail, trailNodes, false, internalVars, copyLoc); + replaceConstViolation( + trail, trailNodes, amendmentType === CONST_VIOLATION_SILENT, internalVars, copyLoc + ); } }