Fix some certain wordings breaking page (#440)
This commit is contained in:
parent
157b50c58e
commit
fcf19a07e8
1 changed files with 6 additions and 0 deletions
|
@ -10,7 +10,13 @@ const select = (state, props) => {
|
||||||
let uri = props.uri;
|
let uri = props.uri;
|
||||||
let claim;
|
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) {
|
function getValidClaim(testUri) {
|
||||||
|
if (testUri.replace('lbry://', '').length <= 1) return;
|
||||||
|
|
||||||
claim = makeSelectClaimForUri(testUri)(state);
|
claim = makeSelectClaimForUri(testUri)(state);
|
||||||
if (claim === null && punctuationMarks.includes(testUri.charAt(testUri.length - 1))) {
|
if (claim === null && punctuationMarks.includes(testUri.charAt(testUri.length - 1))) {
|
||||||
getValidClaim(testUri.substring(0, testUri.length - 1));
|
getValidClaim(testUri.substring(0, testUri.length - 1));
|
||||||
|
|
Loading…
Reference in a new issue