You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a waypoint unmounts another waypoint as part of handling an
onEnter/onLeave, and the two waypoints are attached to the same
scrollable ancestor, we could end up with this error:
Uncaught TypeError: handlers[index] is not a function
Consider the following example, where the first handler removes the
second:
```js
const a = {}
a.handlers = {
1: function() {
delete a.handlers[2];
},
2: function() {},
};
Object.keys(a.handlers).forEach(function(index) {
a.handlers[index]();
});
// => Uncaught TypeError: a.handlers[index] is not a function(…)
```
Adding a guard against undefined handlers fixes the problem. Testing
this turned out to be quite hard, so for now I'm just rolling with a
manual fix.
0 commit comments