Only show alert if user typed something

This commit is contained in:
Lim Chee Aun 2023-02-18 23:29:17 +08:00
parent ccdb8d144c
commit d4a6aa2d3b

View file

@ -83,7 +83,7 @@ function Public({ local, ...props }) {
'Enter a new instance e.g. "mastodon.social"', 'Enter a new instance e.g. "mastodon.social"',
); );
if (!/\./.test(newInstance)) { if (!/\./.test(newInstance)) {
alert('Invalid instance'); if (newInstance) alert('Invalid instance');
return; return;
} }
if (newInstance) { if (newInstance) {