handleAdd did not work correctly for a while: some state was not cleaned
up (try: wireless -> add -> no changes -> click dismiss -> press save).
The state is now properly removed when pressing dismiss, by stashing
addedSection correctly under the map m and not in this.
Also requires a null check in render_modal_status.
Signed-off-by: Paul Donald <[email protected]>
(cherry picked from commit
6c061b644c1380b841542f44179195756cc5a645)
}
function render_modal_status(node, radioNet) {
+ if (!radioNet) return;
+
const mode = radioNet.getActiveMode();
const noise = radioNet.getNoise();
const bssid = radioNet.getActiveBSSID();
uci.set('wireless', section_id, 'ssid', 'OpenWrt');
uci.set('wireless', section_id, 'encryption', 'none');
- this.addedSection = section_id;
+ m.addedSection = section_id;
return this.renderMoreOptionsModal(section_id);
};