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: calculation leads to runtime error when switching to structurally different language (fixes #235) #236

Closed
wants to merge 1 commit into from

Conversation

chris-steele
Copy link
Contributor

#235

Fix

  • calculation leads to runtime error when switching to structurally different language

@chris-steele
Copy link
Contributor Author

Why has the location not been changed when navigating to a new language?

https://github.com/adaptlearning/adapt-contrib-core/blob/4f04cc88b00570c0b950528d45adb6d60030e144/js/router.js#L364 https://github.com/adaptlearning/adapt-contrib-core/blob/4f04cc88b00570c0b950528d45adb6d60030e144/js/router.js#L204

PLP is responding to a (bubbling) completion property change which occurs during the data load that changing language initiates - this occurs before adapt:start triggers routing in the start controller: https://github.com/adaptlearning/adapt-contrib-core/blob/master/js/startController.js#L93

@oliverfoster
Copy link
Member

oliverfoster commented Jul 19, 2024

Should probably reset the location currentId on language change such that the first if statement returns early?

@chris-steele chris-steele marked this pull request as draft July 21, 2024 09:58
@chris-steele
Copy link
Contributor Author

This PR will not be necessary if adaptlearning/adapt-contrib-core#567 is approved

@oliverfoster
Copy link
Member

adaptlearning/adapt-contrib-core#567 is merged

@oliverfoster oliverfoster deleted the issue/235 branch July 29, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants