allow adding doodle3d printer without ip

This commit is contained in:
casperlamboo 2018-02-12 15:34:46 +01:00
parent c835ea12b2
commit 2b4941eefb

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) && ip !== '') {
if (printer === 'doodle3d_printer' && ip !== '' && !validateIp(ip)) {
this.setState(update(this.state, { addPrinter: { error: { $set: 'Please enter a valid IP adress' } } }));
return;
}