Check for authentication obj before delete operation #1415

This commit is contained in:
ShahanaFarooqui 2024-06-20 13:18:08 -07:00
parent b6dbd23ae7
commit 44582abbbf
2 changed files with 14 additions and 10 deletions

View File

@ -40,11 +40,13 @@ export class CommonService {
return obj;
};
this.removeAuthSecureData = (node) => {
delete node.authentication.macaroonPath;
delete node.authentication.runePath;
delete node.authentication.runeValue;
delete node.authentication.lnApiPassword;
delete node.authentication.options;
if (node.authentication) {
delete node.authentication.macaroonPath;
delete node.authentication.runePath;
delete node.authentication.runeValue;
delete node.authentication.lnApiPassword;
delete node.authentication.options;
}
return node;
};
this.removeSecureData = (config) => {

View File

@ -47,11 +47,13 @@ export class CommonService {
};
public removeAuthSecureData = (node: SelectedNode) => {
delete node.authentication.macaroonPath;
delete node.authentication.runePath;
delete node.authentication.runeValue;
delete node.authentication.lnApiPassword;
delete node.authentication.options;
if (node.authentication) {
delete node.authentication.macaroonPath;
delete node.authentication.runePath;
delete node.authentication.runeValue;
delete node.authentication.lnApiPassword;
delete node.authentication.options;
}
return node;
};