Fixed another state bug in ZT report using deep copy

This commit is contained in:
Shay Nehmad 2019-08-22 14:39:40 +03:00
parent 7f98f55e64
commit bd97c965f1
1 changed files with 2 additions and 2 deletions

View File

@ -32,8 +32,8 @@ const columns = [
class FindingsTable extends Component { class FindingsTable extends Component {
render() { render() {
const data = this.props.findings.map((finding) => { const data = this.props.findings.map((finding) => {
const newFinding = finding; const newFinding = JSON.parse(JSON.stringify(finding));
newFinding.pillars = finding.pillars.map((pillar) => { newFinding.pillars = newFinding.pillars.map((pillar) => {
return {name: pillar, status: this.props.pillarsToStatuses[pillar]} return {name: pillar, status: this.props.pillarsToStatuses[pillar]}
}); });
return newFinding; return newFinding;