Delete keys from internal state instead of setting them to null on DELETE event in mon

This commit is contained in:
Vitaliy Filippov
2024-07-12 16:42:21 +03:00
parent 990c3ba7eb
commit 8973982570
+8 -1
View File
@@ -757,7 +757,14 @@ class Mon
kv.value = kv.value || {};
}
const old = cur[key_parts[key_parts.length-1]];
cur[key_parts[key_parts.length-1]] = kv.value;
if (kv.value == null)
{
delete cur[key_parts[key_parts.length-1]];
}
else
{
cur[key_parts[key_parts.length-1]] = kv.value;
}
if (key === 'config/global')
{
this.config = { ...this.fileConfig, ...this.state.config.global, ...this.cliConfig };