forked from p15670423/monkey
UI: Reformat empty payloads
This commit is contained in:
parent
f4dee02874
commit
674ee02dda
|
@ -13,7 +13,12 @@ export function reformatConfig(config, reverse = false) {
|
|||
}
|
||||
formattedConfig['keep_tunnel_open_time'] = formattedConfig['advanced']['keep_tunnel_open_time'];
|
||||
} else {
|
||||
if(formattedConfig['payloads'].length !== 0)
|
||||
{
|
||||
formattedConfig['payloads'] = formattedConfig['payloads'][0]['options'];
|
||||
} else {
|
||||
formattedConfig['payloads'] = {'encryption': {}, 'other_behaviors': {}}
|
||||
}
|
||||
formattedConfig['advanced'] = {};
|
||||
formattedConfig['advanced']['keep_tunnel_open_time'] = formattedConfig['keep_tunnel_open_time'];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue