Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove onConnected listener on remove #461

Merged
merged 2 commits into from Apr 3, 2024
Merged

Conversation

vincentfretin
Copy link
Member

That's an edge case, if we're on connectedOnLoad: false, add a networked component, remove it, and then connect, we got an error this.data undefined because the onConnected listener is not removed. This change fixes that.

I encountered the error with my a-waypoint primitive that creates a networked component and the waypoint compnent removes it right away if it's a spawn point, then I connect and get the error.

@vincentfretin vincentfretin merged commit e26fa47 into master Apr 3, 2024
1 check passed
@vincentfretin vincentfretin deleted the remove-listener branch April 3, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant