Skip to content

Commit

Permalink
remove unnecessary if check
Browse files Browse the repository at this point in the history
  • Loading branch information
davisjam committed Jun 2, 2018
1 parent 2e05c77 commit 0610f9f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -1357,14 +1357,8 @@ function splitCells(tableRow, count) {

// Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').
// /c*$/ is vulnerable to REDOS.
// invert: Remove suffix of non-c chars instead. Default false.
// invert: Remove suffix of non-c chars instead. Default falsey.
function rtrim(str, c, invert) {
if (typeof invert === 'undefined' || !invert) {
invert = false;
} else {
invert = true;
}

if (str.length === 0) {
return '';
}
Expand Down

0 comments on commit 0610f9f

Please sign in to comment.