Skip to content

Commit

Permalink
add app
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatyana-js committed May 30, 2024
1 parent 59c7958 commit f3d947a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ export default () => {

validate(urlTarget, urlFeeds)
.then(({ url }) => axios.get(proxyObj(url)))
.catch(() => {});
.catch((error) => {
watchedState.form.isValid = false;
watchedState.form.errors.push(error);
});
});
});
};
2 changes: 1 addition & 1 deletion src/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default (elements, i18n, state) => {
case 'form.errors':
errorElement.classList.remove('text-success');
errorElement.classList.add('text-danger');
errorElement.textContent = t('invalidUrl');
errorElement.textContent = t('errors.invalidUrl');
break;
default:
}
Expand Down

0 comments on commit f3d947a

Please sign in to comment.