Check for authentication obj before delete operation #1415 (#1416) (#1417)

pull/1420/head
ShahanaFarooqui 3 months ago committed by GitHub
parent b6dbd23ae7
commit 5a6b5f2cae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

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

Loading…
Cancel
Save