allow for empty ip in add doodle printer

This commit is contained in:
casperlamboo 2018-02-06 11:16:41 +01:00
parent a08223f243
commit 78764383e1

View File

@ -267,7 +267,7 @@ class Settings extends React.Component {
this.setState(update(this.state, { addPrinter: { error: { $set: 'Please enter a name and printer' } } }));
return;
}
if (printer === 'doodle3d_printer' && !validateIp(ip)) {
if (printer === 'doodle3d_printer' && !validateIp(ip) && ip !== '') {
this.setState(update(this.state, { addPrinter: { error: { $set: 'Please enter a valid IP adress' } } }));
return;
}