Skip to content

Commit 47773a3

Browse files
Ni-2alsakhaev
authored andcommitted
fix: show error on wrong source name
1 parent 1c46236 commit 47773a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/xen-tg-app/src/components/NewsSource.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ export const NewSubscription: FC<{ onClose: () => void }> = ({ onClose }) => {
9494
}, [newLink])
9595

9696
const onSubmit = () => {
97-
if (!source || !newLink) return
98-
if (!isValid) {
97+
if (!newLink) return
98+
if (!isValid || !source) {
9999
setShowWrongSubscriptionNameMessage(true)
100100
} else {
101101
addSubscription.mutate({

0 commit comments

Comments
 (0)