dylan-smith / DiveIntelligence

1 stars 1 forks source link

Do a deep clone in DiveProfile.clone #215

Closed dylan-smith closed 3 months ago

dylan-smith commented 3 months ago

Because segments are mutable, we could easily introduce bugs by mutating a segment in one half of the clone and not realizing we are updating the other side too.

Should introduce a segment.clone() then we can do this.segments.map(s => s.clone())