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

Fix avatar page not loading #5736

Merged
merged 1 commit into from
Oct 3, 2022
Merged

Fix avatar page not loading #5736

merged 1 commit into from
Oct 3, 2022

Conversation

netpro2k
Copy link
Contributor

@netpro2k netpro2k commented Oct 3, 2022

Avatar page fails to load because a roundabout dependency chain1 ends up loading netcode.js, which expects NAF to exist. Untangling that is a bit difficult, but also we don't want to be using NAF in the new netcode anyway, so for now just add a check to prevent the page from failing to load.

The real fix is to continue removing use of globals like APP and NAF and to figure out a better solution for system initialization than directly executing code in the module.

Footnotes

  1. avatar.js loads app.ts to define the APP global, since various things rely on it. app.ts needs mainTick from hubs-systems.ts which in turns ends up also loading all the systems code, including netcode.ts which immediately executes some code relying on NAF global.

@netpro2k netpro2k merged commit 408c09e into master Oct 3, 2022
@netpro2k netpro2k deleted the fix-avatar-page branch October 3, 2022 19:02
@matthewbcool matthewbcool mentioned this pull request Oct 4, 2022
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