Skip to content

Commit 54b1474

Browse files
authored
Fix/index page (#4)
* fix * fix index page * fix access url
1 parent bde90c5 commit 54b1474

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

frontend/pages/index.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,10 @@ const formData = ref({
248248
const config = useRuntimeConfig()
249249
const accessUrl = computed(() => {
250250
if (!result.value) return ''
251+
// if result.value is not a valid uuid, return an empty string
252+
if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(result.value)) {
253+
return result.value
254+
}
251255
const baseUrl = window.location.origin
252256
return `${baseUrl}/access/${result.value}`
253257
})

0 commit comments

Comments
 (0)