Skip to content

Commit

Permalink
Shorten code [refactor]
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Dec 3, 2023
1 parent 8400838 commit 6c0a0c7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/serialize/parseFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
}

Expand Down

0 comments on commit 6c0a0c7

Please sign in to comment.