Skip to content

Commit

Permalink
Resolved bug in stripTrailingSlashes
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs committed Aug 24, 2021
1 parent 6924967 commit f6ec430
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function replacer(key, value) {
* @param {*} inURL
*/
function stripTrailingSlashes(inURL) {
return inURL.endsWith("/") ? inURL.replace(/\/+$/, "") : inURL;
return inURL && inURL.endsWith("/") ? inURL.replace(/\/+$/, "") : inURL;
}

/**
Expand Down

0 comments on commit f6ec430

Please sign in to comment.