When we have multiple listeners and one is removed before the other one is added, we run into an issue where the loop is trying to access an element of the refs array when it no longer exists.
Solution for the time being is to use a shallow clone of refs
When we have multiple listeners and one is removed before the other one is added, we run into an issue where the loop is trying to access an element of the
refs
array when it no longer exists.Solution for the time being is to use a shallow clone of
refs