luci-mod-network: interfaces.js: avoid stray empty device uci sections
authorJo-Philipp Wich <jo@mein.io>
Sun, 5 Feb 2023 18:35:00 +0000 (19:35 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 5 Feb 2023 18:37:28 +0000 (19:37 +0100)
commitc13ef9406c9c2e12c28d2065b342444af5e27c0b
tree27ea802de6454c8c3c6ffd9b441304a11b7c5e97
parent4c304ce332c7d3f1790bcdcfe317af6482b4a99b
luci-mod-network: interfaces.js: avoid stray empty device uci sections

Ensure that just created uci device sections are removed if the edit
option modal is cancelled without saving. This prevents empty, but
harmless `config device` sections from being created on a subsequent
Save & Apply operation.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js