Closed dylan-smith closed 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())
segment.clone()
this.segments.map(s => s.clone())
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 dothis.segments.map(s => s.clone())