mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-04-30 13:11:37 +03:00
Check upstream length in component
This commit is contained in:
parent
f727f999f9
commit
c2a2b3ea6a
3 changed files with 18 additions and 18 deletions
client/src/components/Settings
|
@ -44,7 +44,11 @@ export default class Settings extends Component {
|
|||
};
|
||||
|
||||
handleUpstreamTest = () => {
|
||||
this.props.testUpstream(this.props.settings.upstream);
|
||||
if (this.props.settings.upstream.length > 0) {
|
||||
this.props.testUpstream(this.props.settings.upstream);
|
||||
} else {
|
||||
this.props.addErrorToast({ error: 'No servers specified' });
|
||||
}
|
||||
};
|
||||
|
||||
renderSettings = (settings) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue