Fix some certain wordings breaking page (#440)

This commit is contained in:
saltrafael 2021-12-07 16:03:19 -03:00 committed by GitHub
parent 157b50c58e
commit fcf19a07e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,13 @@ const select = (state, props) => {
let uri = props.uri;
let claim;
/* Used in case of a non-existant claim ending on a punctuation mark,
checks if the url exists without it in case the user was looking for it
and added the punctuation mark for grammatical purposes (it gets added
as part of the URI because some punctuation marks are allowed on URIs) */
function getValidClaim(testUri) {
if (testUri.replace('lbry://', '').length <= 1) return;
claim = makeSelectClaimForUri(testUri)(state);
if (claim === null && punctuationMarks.includes(testUri.charAt(testUri.length - 1))) {
getValidClaim(testUri.substring(0, testUri.length - 1));