Please sign in to comment.
fix: Events#off threw if Object.prototype had extra enumerable proper…
…ties, don't remove all events if off receives a falsey value (#4669) If Object.prototype was modified to have extra properties, the `off` method crashed because `data.handlers` would've been removed before getting to the extra property. Also, this fixes an issue where if a falsey value was passed to off, the events system would remove all the events, i.e. `player.off('')`. Instead, we make sure that only if it is called as `player.off()` will they be removed.
- Loading branch information...