2
0

🐛 Fix public id validation

Did not work with this kind of path: test-a-test

Closes #512
This commit is contained in:
Baptiste Arnaud
2023-05-16 15:12:49 +02:00
parent 27b009dd76
commit 853451b4fa

View File

@ -54,7 +54,7 @@ export const SharePage = () => {
const checkIfPathnameIsValid = (pathname: string) => {
const isCorrectlyFormatted =
/^([a-z0-9]+-[a-z0-9]+)*$/.test(pathname) || /^[a-z0-9]*$/.test(pathname)
/^([a-z0-9]+-[a-z0-9]*)*$/.test(pathname) || /^[a-z0-9]*$/.test(pathname)
if (!isCorrectlyFormatted) {
showToast({