From 7e885f8c2a446e7827e95eb5ebbe5c26ff894d0d Mon Sep 17 00:00:00 2001 From: Dana Yatsuta Date: Wed, 13 Mar 2024 06:46:20 +0300 Subject: [PATCH] Reset no link error earlier --- src/components/LinkListForm.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/LinkListForm.vue b/src/components/LinkListForm.vue index 178ab8e..f17c75b 100644 --- a/src/components/LinkListForm.vue +++ b/src/components/LinkListForm.vue @@ -11,6 +11,8 @@ export default { const trimmedLink = this.link.trim() if (trimmedLink !== '') { + this.noLinkError = false + const response = await fetch( 'https://url.api.stdlib.com/temporary@0.3.0/create/?' + new URLSearchParams({ @@ -29,7 +31,6 @@ export default { this.$emit('addLink', newLink) } - this.noLinkError = false this.link = '' } else { this.noLinkError = true