mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-31 17:31:27 +00:00
Fix bid position and claim sequence regexes
This commit is contained in:
parent
96bd8285f4
commit
839e629362
1 changed files with 4 additions and 4 deletions
|
@ -74,12 +74,12 @@ uri.parseLbryUri = function(lbryUri, requireProto=false) {
|
||||||
throw new Error(`Invalid claim ID ${claimId}.`);
|
throw new Error(`Invalid claim ID ${claimId}.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bidPosition && !bidPosition.match(/^-?[1-9][0-9]+$/)) {
|
if (claimSequence && !claimSequence.match(/^-?[1-9][0-9]*$/)) {
|
||||||
throw new Error('Bid position must be a number.');
|
throw new Error('Claim sequence must be a number.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (claimSequence && !claimSequence.match(/^-?[1-9][0-9]+$/)) {
|
if (bidPosition && !bidPosition.match(/^-?[1-9][0-9]*$/)) {
|
||||||
throw new Error('Claim sequence must be a number.');
|
throw new Error('Bid position must be a number.');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate path
|
// Validate path
|
||||||
|
|
Loading…
Add table
Reference in a new issue