-
Notifications
You must be signed in to change notification settings - Fork 175
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
Ensure "last airport" exists before attempting to load it #709
Comments
I thought we had a default value in there for cases when localStorage check comes back |
we may? which would mean this would be very easy since the framework would then be in place. What we need to resolve this particular problem would be to deal with when previously available airports are removed for whatever reason. For example, EHAM is broken. Someone who last played the game a long time ago while it was available, if the site is still cached, the value is |
I see where you're going there. So we should also check that the stored airport is also available. |
During initialization of the app, check local storage for
localstorage[STORAGE_KEY.ATC_LAST_AIRPORT]
(the one we will subsequently attempt to load). If it is not present in the load list, that means there will be no airport file to load, and the app will never make it through the initialization process. If this is the case, reset the local storage (either the last airport value to the default airport), or all of the values... whatever it takes to be sure that users that had an airport cached that no longer exists will not have the site stuck in a state where it can never complete the load without manually flushing the cache.The text was updated successfully, but these errors were encountered: