1
0
mirror of https://github.com/Lissy93/web-check.git synced 2025-07-08 08:16:51 +02:00

fix: remove slash character at the end if exists

This commit is contained in:
Ulises Gascón
2023-07-17 17:26:08 +02:00
committed by GitHub
parent 77b8feb435
commit a3d7463df6

@ -55,7 +55,7 @@ const Home = (): JSX.Element => {
/* Check is valid address, either show err or redirect to results page */ /* Check is valid address, either show err or redirect to results page */
const submit = () => { const submit = () => {
let address = userInput; let address = userInput.endsWith("/") ? userInput.slice(0, -1) : userInput;
const addressType = determineAddressType(address); const addressType = determineAddressType(address);
if (addressType === 'empt') { if (addressType === 'empt') {