I am getting same problem when code is as per below:
e.name = this.getBedName(LocationPhysicalTypes.BED, bedNameOrder);
for this I resolved this issue by below code:
e = { ...e, name : this.getBedName(LocationPhysicalTypes.BED, bedNameOrder) };
And instead of forEach loop , I have used .map() function for that.