explorer: block query should be strictly integers (#15442)
This commit is contained in:
parent
5548e599fe
commit
58b35db384
|
@ -12,7 +12,11 @@ export function BlockDetailsPage({ slot }: Props) {
|
||||||
const slotNumber = Number(slot);
|
const slotNumber = Number(slot);
|
||||||
let output = <ErrorCard text={`Block ${slot} is not valid`} />;
|
let output = <ErrorCard text={`Block ${slot} is not valid`} />;
|
||||||
|
|
||||||
if (!isNaN(slotNumber) && slotNumber < MAX_SAFE_INTEGER) {
|
if (
|
||||||
|
!isNaN(slotNumber) &&
|
||||||
|
slotNumber < MAX_SAFE_INTEGER &&
|
||||||
|
slotNumber % 1 === 0
|
||||||
|
) {
|
||||||
output = <BlockOverviewCard slot={slotNumber} />;
|
output = <BlockOverviewCard slot={slotNumber} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue