It was identified that for root navigation, when there is an observer that must be inherited, and it has already been registered in the observer property, it is registered twice.
We need to ensure that there is only one observer record per navigation.
How?
A function has been implemented that only allows you to register an observer if it does not exist.
This function has O(n) complexity and guarantees efficiency regardless of the number of observers.
What?
It was identified that for root navigation, when there is an observer that must be inherited, and it has already been registered in the observer property, it is registered twice. We need to ensure that there is only one observer record per navigation.
How?
A function has been implemented that only allows you to register an observer if it does not exist.
This function has O(n) complexity and guarantees efficiency regardless of the number of observers.