luci-base: prevent tools.widgets.ZoneSelect tracebacks
authorPaul Donald <[email protected]>
Wed, 23 Apr 2025 12:04:12 +0000 (14:04 +0200)
committerPaul Donald <[email protected]>
Wed, 23 Apr 2025 12:25:37 +0000 (14:25 +0200)
commit1369ee74a6af64298a09b32f580d6c4fdd9a05c5
treef6bd8656a1997efa278cec8b1d5a9edbe2b56ec7
parentd0b983a6dd05972bf8691d5efa28eae39b2fee9a
luci-base: prevent tools.widgets.ZoneSelect tracebacks

follow-up fix for 0be4ad51a0bea3e1e3e6cd7d646e11ec6c722540

It seems to have been this way for a while, for zone selections
involving the 'any' ('*') choice. firewall forwards.js has no
'this.allowany;' property on the widgets, so the any choice is absent,
leading to a traceback, caused by the 'src' widget, even though
this code block operates on the 'dst' value. Certain combinations of
'src' and 'dst' also triggered tracebacks.

This might not be the correct behaviour for this widget, but it does
prevent tracebacks caused by null values.

Signed-off-by: Paul Donald <[email protected]>
(cherry picked from commit aa6924cd4ce64cc6e4ced50b0603f9f34b3e619c)
modules/luci-base/htdocs/luci-static/resources/tools/widgets.js