luci-app-firewall: snats.js: fix rewrite IP validation for SNAT target

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2020-02-22 22:19:54 +01:00
parent 0677a9643e
commit d527c28ffa

View file

@ -220,7 +220,7 @@ return L.view.extend({
a = this.formvalue(section_id),
p = port ? port[0].formvalue(section_id) : null;
if ((a == null || a == '') && (p == null || p == ''))
if ((a == null || a == '') && (p == null || p == '') && value == '')
return _('A rewrite IP must be specified!');
return true;