From e57f8663afd53cc7421debcd63444e1d136f5dec Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 17 Jun 2021 17:44:21 +0200 Subject: luci-mod-network: parse ports without tag/pvid annotation as well Fixes: 01eac366f6 ("luci-mod-network: fix tagging/pvid state parsing in bridge-vlan ports") Signed-off-by: Jo-Philipp Wich --- .../luci-mod-network/htdocs/luci-static/resources/tools/network.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/luci-mod-network/htdocs') diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js index bba0e80f87..e066cb43dd 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js @@ -272,9 +272,9 @@ var cbiTagValue = form.Value.extend({ if (s[0] != this.port) continue; - var t = s[1].match(/t/) ? 't' : 'u'; + var t = /t/.test(s[1] || '') ? 't' : 'u'; - return s[1].match(/\*/) ? [t, '*'] : [t]; + return /\*/.test(s[1] || '') ? [t, '*'] : [t]; } return ['-']; -- cgit v1.2.3