When attempting to remove properties from an object, it may throw an error if the property does not have a value. What is the correct method to delete similar properties from multiple objects?
Main.js
if (data.details.primary.transactionHistory !== undefined ||
data.details.secondary.transactionHistory !== undefined) {
delete data.details.primary.transactionHistory;
delete data.details.secondary.transactionHistory;
}